0

What would be the recommended choice for database replication with failover? I know this is a broad question but I'm curious what the general experiences are when it comes to real life setups.

As far as I understood galera is not a failover setup since it refuses to handle queries as soon as the cluster becomes too small when servers start failing.

Is going with a master / slave better?

The goal is: database always available on at least one server. It's a relative small setup data-wise (max 2 gig of data, low-traffic)

1 Answers1

1

I think you are a bit confused as to what Galera is and what it isn't.

Galera is a multi-master replication system that allows 2 (preferably 3) or more nodes to replicate data amongst themselves and provide some level of high availability or load balancing. You should not use it with less than 3 nodes because of split brain cases.

Galera can operate with one node left standing and does not start failing due to number of nodes - however if all nodes go down, you need to bootstrap the entire cluster manually as it does not have an automated way of doing this (apart from Percona but that's a different thing altogether).

I think you should be asking yourself the question; how will I implement the failover system? You need to either have your application / service maintain a list of healthy servers using a proxy server (for example HaProxy can do this) or have your application / service internally do this by seeing which servers reply and hop to the next MySQL/MariaDB node.

All in all, your question is a very broad one and it's quite hard to give an exact answer as it all depends on what type of service and infrastructure you have at your disposal.

Miuku
  • 760
  • 6
  • 7