How to set up MariaDB and Redis High Availability Cluster in Mesos or CoreOS

Most tutorials, presentations, and demos present only stateless services that are load balanced either through DNS (SkyDNS, skydock, etc.) or through a reverse proxy, for example, HAproxy or Vulcand, which are configured using etcd or ZooKeeper.

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

  • CoreOS + fleet + docker; or

  • Mesos + Marathon + Docker

  • Any other cluster management solutions

How to configure a Redis cluster and a MariaDB (Galera) cluster when the host running the wizard can change?

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

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

+5
source share
2 answers

After posting the question, I got lucky and came across several repositories that achieved what I'm looking for:

Redis

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

Percona / galera cluster

Image from the finished working docker - https://github.com/paulczar/docker-percona_galera

+5
source

You can use CoreOS (or any other platform that Docker can run on) and Kubernetes with SkyDNS integration , this will allow you to get the IP address of the wizard. Kubernetes also comes with a proxy (for service discovery), which sets environment variables in your containers. You can access them at runtime. I think the best way (and the way you need to go) is to use a service discovery tool like SkyDNS or something similar. Here is a simple example of Kubernet.

You can also do this with a fleet and side kicks, but I think Kuberentes helps you a bit and you better use it. It's just a little tricky to set up :)

I haven't used Mesos and Marathon yet, but I think they should do it too. They ( https://github.com/mesosphere/marathon#features ) have all the tools necessary to install your cluster.

0
source

Source: https://habr.com/ru/post/1209213/


All Articles