Cluster Groups & Nodes

How does dgraph decide number of groups?
Let’s say my cluster is made up of following.

  • 3 zero (each 56 GB, 1 X 2 TB SSD NVMe disks)
    – The --replicas flag is set to 3
  • 12 alpha nodes (each 128GB, 2 X2 TB SSD disks)
    – The --replicas flag is set to 2

Per, my understand of the docs

  • Dgraph will create 4 groups with 3 Alpha nodes in each group
  • Data itself has 2 copies (plus primary?)
1 Like

Based on the Replica set and the amount of Alphas.

Divide 12 per 3 = 4 Groups.

The data is replicated per group.

Group 1
name.user (replicated 3 times within the group)
age.user (replicated 3 times within the group)

Group 2
name.product (replicated 3 times within the group)
value.product (replicated 3 times within the group)
track.product (replicated 3 times within the group)

Group 3
ticket.transaction (replicated 3 times within the group)
status.transaction (replicated 3 times within the group)

3 Alphas serves the same data within the Group. I personally recommend that you separate each Alpha of a Group in a separated host. This way you avoid for example crashing a K8s node with Alphas of the same group.

If you have replica set as default, you gonna have 12 groups.

1 Like

@MichelDiz thanks for the reply.

3 Alphas serves the same data within the Group. I personally recommend that you separate each Alpha of a Group in a separated host. This way you avoid for example crashing a K8s node with Alphas of the same group.

  • 100% agree, that’s the whole idea behind deploying 12 Alphas
  • With my above said configuration, I’m hoping each Alpha of the group will in a separate host, can you confirm?
1 Like

To have my recommended configuration you have to have 4 machines/bareMetal/CloudDedicatedInstances. And spread the groups between them.

e.g:

Bare Metal 1

Zero 1

Alpha 1 Group 1
Alpha 5 Group 2
Alpha 9 Group 3

Bare Metal 2

Zero 2

Alpha 2 Group 1
Alpha 6 Group 2
Alpha 10 Group 3

Bare Metal 3

Zero 3

Alpha 3 Group 1
Alpha 7 Group 2
Alpha 11 Group 3

Bare Metal 4

Alpha 4 Group 4 (connect to Zero 3)
Alpha 8 Group 4 (connect to Zero 3)
Alpha 12 Group 4 (connect to Zero 3)

PS. I forgot to arrange the group 4. But you know what I mean.

1 Like