HA Cluster Setup

In the docs:

The new Alphas will automatically detect each other by communicating with Dgraph zero and establish connections to each other.

This is saying that the alphas are able to communicate with each other (other alphas) by speaking to the Zero instance you specify in the config if I’m not mistaken, I’m talking about the alpha being able to speak to any zero if one goes down.

I’m not a dgraph expert, but I think it’s not so bad to run with an alpha and zero on the same host because they operate independently (more specifically they have independent HA). But there may be other reasons to avoid that - e.g. resource contention.

I agree it’s not so bad, but it would be the same as running two microservices on the same host. You wouldn’t do this for a production environment because as I stated before, despite their being independent HA, if one box goes down, that jeopardizes your HA on two services, both alpha and zero.

You also want to take into account scaling infrastructure. You’ll want to have an autoscaling group with a minimum set to 3, which increases in size if your existing nodes experience high CPU usage. You are already having to use large instances to support both alpha and zero on the same host. Alpha spikes in cpu usage, you now have more instances with both alpha and zero running, when in reality, zero doesn’t need that many instances running to keep up with demand. You’re assigning compute power to zero unnecessarily.