LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

my (new?) idea for a HA MySQL Setup

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: my (new?) idea for a HA MySQL Setup
From: Dominik Klein <dk@xxxxxxxxxxxxxxxx>
Date: Tue, 28 Mar 2006 15:30:18 +0200
Hi,

I just want to know what you guys think of this setup:

The goal is a HA mysql Server.

This is what it currently looks like:

 +--------+
 | SWITCH |
 +--------+
  |      |
  |      |
+---+  +---+
| A |--| B |
+---+  +---+

Master to Master replication is done via direct gigabit connection between machines A and B (cross cable).

Clients connect through the switch to the VIP.

Machine A:
mysql 5.0.19, auto_increment_increment=2, auto_increment_offset=1, log-bin, log-slave-updates, server_id=1, master_host=B

keepalived 1.1.12, realserver: localhost, sorry_server: B, state MASTER

Machine B:
mysql 5.0.19, auto_increment_increment=2, auto_increment_offset=2, log-bin, log-slave-updates, server_id=2, master_host=A

keepalived 1.1.12, realserver: A, sorry_server: localhost, state BACKUP

This would be some kind of "abuse" of keepalived. It is just intended to take care of the VIP and put in the sorry_server on MySQL-failure. No loadbalancing whatsoever. Machines are both big enough to handle the amount of traffic.

On network failure on A, the VIP moves to B. Depending on the status of the direct connection, either A or localhost is then used as MySQL-Server.
On MySQL-failure on A, machine B would be put in as sorry_server.

I think this could work out fine, what do you think? Any advice would be appreciated. What pitfalls did I not think of?

Regards,
Dominik

<Prev in Thread] Current Thread [Next in Thread>
  • my (new?) idea for a HA MySQL Setup, Dominik Klein <=