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?

  • How to use forever within a Docker container
  • Docker-Compose with Docker 1.12 “Swarm Mode”
  • Docker on CentOS 7.2: kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1
  • How can I see a dynamically assigned port from within a docker container?
  • Restart one service in docker swarm stack
  • docker sonarqube checkdependency plugin
  • Already we do this on our API servers and Web servers.

  • Error setting up docker on Windows
  • Unable to correct problems, you have held broken packages
  • docker run from systemd service starts but exits immediately, and restarts, but docker run from shell works fine
  • Do ruby gi lmitations apply to docker containers
  • How to get a secret from HashiCorp's Vault HTTP API into a docker container?
  • how to get container name from inside?
  • 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 It is very easy to set up using an HAProxy Docker container.

    For Redis it definitely looks like you need Sentinel: In you can find a docker image for Sentinel.

    I don’t think using a proxy like Nginx is an appropriate solution for both problems.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.