Docker failover: Redis, MySQL and Nginx
Currently we have
Redis master and
Redis slave containers.
MySQL master and
MySQL slave containers. Both replicating.
How would we handle a failure on one of the master containers? Should I be using something like Nginx as a forward proxy to detect connection failures?
Already we do this on our
API servers and
One Solution collect form web for “Docker failover: Redis, MySQL and Nginx”
For the replication of MySQL I suggest configuring MySQL in a master <-> master approach and setup an HAProxy load balancer over them, as eugeneware does in https://github.com/eugeneware/docker-mysql-replication. It is very easy to set up using an HAProxy Docker container.
I don’t think using a proxy like Nginx is an appropriate solution for both problems.