[racktables-users] Re: Question about racktables and mysql Cluster.

  • From: Jonathan Thurman <jthurman42@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 10 Jul 2009 21:13:57 -0700

On Fri, Jul 10, 2009 at 8:33 PM, Michael Mansour <mic@xxxxxxxxxxx> wrote:

> > I can think of three options in order of complexity (most to least):
> > MySQL Cluster, MySQL / DRBD, MySQL Multi-master / Virtual IP.
> >
> > MySQL Cluster requires at least 3 servers just to run the database
> > (if you want any type of HA).  There are lots of things to think
> > about, like all indexes are stored ONLY in RAM (as is ALL data by
> > default) which can be rather limiting if not engineered correctly.
>
> Yeah, it sounds like for that you need pretty good DBA skills.
>
> > A MySQL/DRBD option is also somewhat tricky to get going if you haven't
> > before.  It does require less hardware (2 servers) and no
> > modifications to the tables.  If you can be tolorent of a few
> > seconds of downtime if a node fails, then this should work just
> > fine.  You would have to write a script to launch MySQL on the
> > failover node too.
>
> It's been years since I was "new" to linuxha.net but even then I didn't
> really
> find it hard to get going, and the years since it's just gotten easier.
>

I haven't used linuxha.net before.  I didn't read well enough and was
thinking linux-ha.org.  Too many similar projects with similar names!  From
my quick glance of the FAQ at linuxha.net it seems to try and simplify the
DRBD/Heartbeat configuration.  I do agree that anyone who knows Linux well
can get this setup without too much difficulty.


>
> I currently run five linuxha.net clusters (most with MySQL HA'ed in them)
> and
> another three for clients. The most recent linuxha.net cluster I built
> HA's
> XEN guest's and I found that easier to setup than actual cluster apps
> (which
> need file syncing and scripts between nodes). Because the XEN guest is
> self-contained, there's not much to it apart from bringing it down on one
> node
> and up on another.
>

I haven't tried XEN guests.  They would be nice and portable, but how long
does the failover take to boot the virtual machine?  We have a lot of
virtual machines on VMWare ESX, and my only real complaint is you have to
maintain a lot of OSes for each VM as well as the base 'bare metal' servers.


>
> > MySQL Multi-master would let you update to either server, and only
> requires
> > 2 servers.  It could also be more geographically redundant (except
> > for the shared IP, but you could get around that by using a load
> > balance like Pirahna in front).  This type of replication is
> > asynchronous and you could lose data.
>
> That's something I've always wanted to "try" just out of interest but if
> there's the possibility of losing data? hmm.. maybe not.
>

You can lose data if you insert a record on the failing server before it is
replicated.  Since replication doesn't wait to make sure the slave got the
update before telling the client that the record was committed.  If you
arn't doing a lot of updates, or you don't care if the last transactions my
not exist, this works pretty well.

To be fair, MySQL Cluster could also lose data if every replica failed at
the same time between check-points.  Data is only guarenteed to be
replicated in RAM before reporting 'committed', not written to disk.  (If
you are that afraid, by the Oracle licences...)

As a side note for all of this DB talk, if you use some sort of MySQL HA
scheme that is block device based, you should probably change the tables to
INNODB.  MYISAM tables are not checked for consistancy at startup, only when
first accessed.  This can cause unexpected delay down the road, especially
for larger tables that arn't access that frequently.

-Jonathan

Other related posts: