# Some confusion about paramaters in Cluster Config

**URL:** <https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718>\
**Category:** Dgraph\
**Created:** [July 3, 2019, 9:35am UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718 "2019-07-03T09:35:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuonglaivinhhang1](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tuonglaivinhhang1/32/1843_2.png) [@tuonglaivinhhang1](https://discuss.dgraph.io/u/tuonglaivinhhang1)\
**Post date:** [July 3, 2019, 9:35am UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718/1 "2019-07-03T09:35:16Z")

</div>

I have 3 servers with 31GB RAM and 300GB HDD, and here is the cluster config

**On SERVER1**

```auto
dgraph zero --my=SERVER1:5080 --replicas 3 --idx 1 --bindall=true --wal /var/run/dgraph/zw
dgraph alpha --my=SERVER1:7080 --lru_mb=10000 --zero=SERVER1:5080 ----badger.vlog=disk -p /var/run/dgraph/p -w /var/run/dgraph/w 

```

**On SERVER2**

```auto
dgraph zero -o 1 --my=SERVER2:5081 --replicas 3 --peer SERVER1:5080 --bindall=true --idx 2 --wal /var/run/dgraph/zw
dgraph alpha --my=SERVER2:7081 --lru_mb=10000 --zero=SERVER1:5080 -o 1 --badger.vlog=disk -p /var/run/dgraph/p -w /var/run/dgraph/w

```

**On SERVER3**

```auto
dgraph zero -o 2 --my=SERVER3:5082 --replicas 3 --peer SERVER1:5080 --bindall=true --idx 3 --wal /var/run/dgraph/zw
dgraph alpha --my=SERVER3:7082 --lru_mb=10000 --zero=SERVER1:5080 -o 2 --badger.vlog=disk -p /var/run/dgraph/p -w /var/run/dgraph/w 

```

I have some question:

1. I set flag **–replicas 3** , does it mean: one alpha group contains 3 servers? and 3 server zero (one group) serves this alpha group? For that, is it the best perfomance ? Do i need more alpha servers?
2. I set flag **–peer SERVER1:5080** in zero config, does it mean: all zero server depend on SERVER1 Zero and when SERVER1 Zero failed (for any reason), all 3 zero has been failed and Dgraph Server will failed?
3. I set flag **–badger.vlog=disk** , mean Badger log will save on disk , not in memory and does it effect on perfomance too much?
4. Can you suggest for me more flag or parameters to increase perfomance for read, rebuild index, insert data… better?  
Thank too much

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [July 3, 2019, 5:57pm UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718/2 "2019-07-03T17:57:19Z")

</div>

> [@tuonglaivinhhang1](#):
>
> set flag **–replicas 3** , does it mean: one alpha group contains 3 servers?

It means that Dgraph Zero has to replicate by 3 the groups he founds.

I think you should read this links from docs.

> **[Get started with Dgraph](https://dgraph.io/docs)**
>
> From learning the basics of graph databases to advanced functions and capabilities, Dgraph docs have the information you need.

**Consistent Replication** in =\> [Get started with Dgraph](https://docs.dgraph.io/deploy/#understanding-dgraph-cluster)  
also this [Get started with Dgraph](https://docs.dgraph.io/deploy/#ha-cluster-setup)

> [@tuonglaivinhhang1](#):
>
> For that, is it the best perfomance ?

Well, performance is more likely related to hardware. Try to use high IOPS storage tho.

> [@tuonglaivinhhang1](#):
>
> - I set flag **–peer SERVER1:5080** in zero config, does it mean: all zero server depend on SERVER1 Zero and when SERVER1 Zero failed (for any reason), all 3 zero has been failed and Dgraph Server will failed?

Not exatcly. Dgraph uses RAFT consensus algorithm [Get started with Dgraph](https://docs.dgraph.io/design-concepts/#raft) - this flag are just setups. If one Zero fail other will take over.

> [@tuonglaivinhhang1](#):
>
> I set flag **–badger.vlog=disk** , mean Badger log will save on disk , not in memory and does it effect on perfomance too much?

RAM are faster than any storage. mmap are recommended if you have RAM available. But if you have NVMe you are okay.

> [@tuonglaivinhhang1](#):
>
> Can you suggest for me more flag or parameters to increase perfomance for read, rebuild index, insert data… better?

You can use best effort queries. [Get started with Dgraph](https://docs.dgraph.io/clients/#read-only-transactions)  
But in general is hardware where you can improve.

---

<div class="post-metadata">

**Author:** ![tuonglaivinhhang1](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tuonglaivinhhang1/32/1843_2.png) [@tuonglaivinhhang1](https://discuss.dgraph.io/u/tuonglaivinhhang1)\
**Post date:** [July 4, 2019, 2:55am UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718/3 "2019-07-04T02:55:40Z")

</div>

> [@MichelDiz](#):
>
> It means that Dgraph Zero has to replicate by 3 the groups he founds.

i have 3 alpha, so that i have only 1 group. I don’t know why you said “3 the groups”?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [July 4, 2019, 3:10am UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718/4 "2019-07-04T03:10:32Z")

</div>

No, I didn’t said “3 groups”. I said “Replicate by 3”, the set (groups) he found.

About Group [https://docs.dgraph.io/design-concepts/#group](https://docs.dgraph.io/design-concepts/#group)

---

<div class="post-metadata">

**Author:** ![tuonglaivinhhang1](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tuonglaivinhhang1/32/1843_2.png) [@tuonglaivinhhang1](https://discuss.dgraph.io/u/tuonglaivinhhang1)\
**Post date:** [July 5, 2019, 2:53am UTC](https://discuss.dgraph.io/t/some-confusion-about-paramaters-in-cluster-config/4718/5 "2019-07-05T02:53:44Z")

</div>

thank for your enthusiastic support 😍
