leader
in the sense defined by the Raft protocol.
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 |