[ClusterLabs] MySQL cluster with auto failover

Antony Stone Antony.Stone at ha.open.source.it
Wed Sep 6 08:11:46 EDT 2023


On Wednesday 06 September 2023 at 12:50:40, Damiano Giuliani wrote:

> Looking at some Galera cluster designs on web seems a couple of server
> proxy are placed in front.

You can certainly do it that way, although some people simply have a floating 
virtual IP across the 3 nodes, and clients connect to whichever (permanently 
running) MySQL instance has the VIP at the time.

> If I would have only 3 nodes where I clustered MySQL with galera how then I
> have to point my application to the right nodes?

Galera is a "write anywhere, read anywhere" replication system.  You do not 
get a "cluster master" which all clients have to write to (or read from), so 
clients can simply connect to any node they like.

If you're familiar with standard MySQL master-slave replication, and you know 
this can be set up in a master-master configuration, simply regard Galera as 
the same outcome but for any number of modes.

One way to ensure that all clients connect to the same node at any given time 
is to use pacemaker or similar to run a floating virtual IP between the nodes.  
Clients connect to the VIP, and reach either MySQL itself, or the proxy (which 
is running on all 3 nodes, same as MySQL is), and the proxy connects to the 
real IPs of the 3 nodes.


Antony.

-- 
+++ Divide By Cucumber Error.  Please Reinstall Universe And Reboot +++

                                                   Please reply to the list;
                                                         please *don't* CC me.


More information about the Users mailing list