Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 862
Anton Evangelatov Avatar asked Dec 16 '14 09:12

Anton Evangelatov


People also ask

What is MariaDB cluster?

MariaDB Cluster is a Multi Master replication system built from MariaDB Server, MySQL wsrep patch and Galera wsrep provider. Galera is based on synchronous (or 'virtually synchronous') replication method, which ensures the data applied to other nodes before it is committed.

How does MariaDB Galera Cluster work?

Galera Cluster manages the replication process using a feedback mechanism called Flow Control. This allows the node to pause and resume replication according to its performance needs and to prevent any node from lagging too far behind the others in applying transaction.

What is a Galera Cluster?

Galera Cluster is a synchronous multi-master database cluster, based on synchronous replication and MySQL and InnoDB. When Galera Cluster is in use, database reads and writes can be directed to any node. Any individual node can be lost without interruption in operations and without using complex failover procedures.


1 Answers

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

like image 161
Anton Evangelatov Avatar answered Sep 24 '22 17:09

Anton Evangelatov