Group
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
A group is a set of 1 or 3 or more servers that work together and have a single
leader
in the sense defined by the Raft protocol.
Alpha group
An Alpha Group
in Dgraph is a shard of data, and may or may not be highly
available (HA). An HA group typically has three Dgraph instances (servers or K8s
pods), and a non-HA group is a single instance. Every Alpha instance belongs to
one group, and each group is responsible for serving a particular set of tablets
(relations). In an HA configuration, the three or more instances in a single
group replicate the same data to every instance to ensure redundancy of data.
In a sharded Dgraph cluster, tablets are automatically assigned to each group, and dynamically relocated as sizes change to keep the groups balanced. Predicates can also be moved manually if desired.
To avoid confusion, remember that you may have many Dgraph Alpha instances due to either sharding, or due to HA configuration. If you have both sharding and HA, you have 3*N groups:
Configuration | Non-HA | HA |
---|---|---|
Non-sharded | 1 Alpha total | 3 Alphas total |
Sharded | 1 Alpha per group | 3*N Alphas for N groups |
Zero group
Group Zero is a lightweight server or group of servers which helps control the overall cluster. It manages timestamps and UIDs, determines when data should be rebalanced among shards, and other functions. The servers in this group are generally called “Zeros.”
Was this page helpful?