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?

  • Print timestamps in Docker Compose logs
  • Docker exec detach and attach
  • openshift internal docker registry repo address is no same as docker-registry service cluster ip
  • how to get container name from inside? docker.io
  • Docker- connetcting AWS DynamoDB with ElasticSearch
  • How to Install Private Python Package as Part of Build
  • Already we do this on our API servers and Web servers.

  • docker build Error checking context: 'can't stat '\\?\C:\Users\username\AppData\Local\Application Data''
  • Configure sendmail inside a docker container
  • Xdebug breaks on access to class static property
  • Dockerfile copy keep subdirectory structure
  • gem install fails when building an image on Docker for Windows
  • RabbitMQ on Docker: Permission denied when chown-ing erlang cookie
  • 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.

    For Redis it definitely looks like you need Sentinel: http://redis.io/topics/sentinel. In https://hub.docker.com/r/joshula/redis-sentinel/ 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.