Ensuring High Availability for Dragonfly in Kubernetes

I’m setting up Dragonfly in Kubernetes for high availability in a production environment. My current plan involves two EC2 nodes across different AZs, with one master and three replicas (one replica on the same node as the master, and two replicas on the other node). However, the service endpoint only shows the master pod, and the replicas aren’t included.

  • Why is only one master used?
  • Can Dragonfly support multiple masters?
  • Is it effective to create separate services for read-only replicas and writes?

Please advise on a robust architecture for Dragonfly in production without a Single Point of Failure (SPOF).

Hi Nasil, Dragonfly doesn’t support multiple masters and hence operator provides service endpoint for master only (Operator doesn’t support cluster yet). There is already a ticket to support service endpoints for read-only replicas Add a load balanced service readonly service over replicas · Issue #142 · dragonflydb/dragonfly-operator · GitHub. Feel free to open a PR!

The operator will failover to one of the replicas in case the master is down. So you can deploy replicas along with the master to get high availability.

1 Like