High availbility example with docker-compose


following up from:

are there examples of setting this up with docker-compose ?
what is the recommended number of alpha nodes, and could we setup more than 1 zero nodes to connect to each other?

Please read https://docs.dgraph.io/faq#dgraph-is-not-highly-available

I don’t think so.

An odd number. But the size it depends in the demand. To know this one would have to evaluate its use.

To achieve consensus, its important that the size of quorum be an odd number.


Zero is about the cluster. It’s not about themselves. But they will connect to each other. You can have as many you want.

u007James: is there a way to setup in a way that it only requires 1 / X number of node online?

Well Alphas depends on Zero be up, I think you could try this for Docker https://docs.docker.com/compose/compose-file/#depends_on

1 Like

how do i setup zero to connect to each other?

There’s no need to. All of your Alphas can run with just one Zero instance.
But what differentiate Zeros is “–idx” port index. And you connect all the others
Zeros to the “Main Zero” with “–peer”. But this is in cases like doing a HA Cluster
for example. Not your case I guess.

Check https://docs.dgraph.io/deploy/#understanding-dgraph-cluster

All you need to know about Zero is in https://docs.dgraph.io/deploy#more-about-dgraph-zero


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.