What's the role of Dgraph server nodes

Welcome!

Here is a breakdown of the roles of servers: (tldr: alphas do most of the work, zeros are used for coordination)
https://dgraph.io/docs/deploy/overview/

As far as custom sharding, there is nothing built in to dgraph to support this, however our team built a program that periodically calls a rpc to get every tablets location and runs a /moveTablet call to make sure each tablet is on the server we expect it to be on. Here are the zero http endpoints: https://dgraph.io/docs/deploy/dgraph-zero/#endpoints. Note that dgraph will automatically move shards around on you every 8m unless you override that setting. https://dgraph.io/docs/deploy/cluster-setup/#shard-rebalancing

Our use case for custom sharding is around multi-tenancy and making sure a customer is collocated with all of their predicates.

1 Like