How to configure a high-availability cluster of MariaDB and Redis in Mesos or CoreOS

Anton Evangelatov picture Anton Evangelatov · Dec 16, 2014 · Viewed 8.1k times · Source

In most tutorials, presentations and demos, only stateless services are presented that are load balanced either via DNS (SkyDNS, skydock, etc.) or via reverse proxy, such as HAproxy or Vulcand, which are configured with etcd or ZooKeeper.

Is there a best practice for deploying a cluster of MariaDB and Redis using:

  1. CoreOS + fleet + Docker; or

  2. Mesos + Marathon + Docker

  3. Any other cluster management solution

How can one configure a Redis cluster and a MariaDB cluster (Galera), when the host running Master may change?

https://github.com/sheldonh/coreos-vagrant/tree/master/redis

http://www.severalnines.com/blog/how-deploy-galera-cluster-mysql-using-docker-containers

Answer

Anton Evangelatov picture Anton Evangelatov · Dec 16, 2014

After posting the question, I was lucky and came across a few repositories that have achieved what I am looking for:

Redis

https://github.com/mdevilliers/docker-rediscluster - A Redis cluster with two Redis instances and three Redis Sentinel monitors. If the Master fails, the Sentinels promote the Slave as a Master. Mark has also created a project that configures HAProxy to use the promoted Master - https://github.com/mdevilliers/redishappy

Percona/Galera cluster

An out-of-the-box working docker image - https://github.com/paulczar/docker-percona_galera