Failover algorithm

Hi,

is it possible to add a failover algorithm, which technically isn't used for load balancing but only high availability? Only thing it needs to do is have a primary IP and a secondary IP, if primary goes down, connections go to secondary.

Thinking of running a HA MySQL server with that, and the easier it is to setup, the better (i.e. not doing any of the IP swapping mojo ourselves).

Anyhow, just an idea…

-Paul

2 Replies

You can already do this with tools available to you.

There's a write-up here http://library.linode.com/linux-ha

I've done this on many servers, physical and virtual, it works quite well. Add DRBD volumes to your MySQL setup and you'll be bombproof.

Another idea, if you're only looking at MySQL durability, is to just set up the two nodes in master-master mode. It's a bit easier to set up, and some would argue it's easier the long term as well (although you can definitely run into walls). Each of your app servers (be they separate or the same as your DBs) can then just access localhost and the DB will handle the syncing. I do this across three Linode data centers using OpenVPN for the tunnel without problems.

On my web servers I use a software load balancer so that even though my front-end is active/backup using HA, the traffic between web servers gets balanced. Of course then Linode came out with NodeBalancers, but it's nice having options.

Last I checked MySQL doesn't always play well in a master master format, I think google did some work on this but not sure if it ever got merged into mainstream mysql. In a HA setup master-slave would work fine if the slave is hot standby.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct