The following config has proven to be reliable while providing the benefit of distributed reads for a read intense application (but no performance gain for writes).
Heartbeat 2.1.3 in v1 mode (no CRM) Two heartbeat managed IP addresses, one on each node Mysql running by init, not heartbeat, on both nodes Mysql circular replication (Google it) with offset uniqueID increments External script to monitor mysql on both nodes and stop heartbeat causing a failover of the IP address (so both are on the remaining node) if one mysql instance does not respond to a simple query. While this seems primitive, I found the complexity of CRM style master/master instances and related constraints to be too complex and less reliable for this purpose. I had to create a real and a dummy mysql instance on each node, so they would both run and failover correctly. As far as DRBD vs. mysql replication goes, real world performance is relatively the same (disk IO is the typical bottleneck) but there is an added benefit in the mysql replication that some types of data corruption will not take down both nodes because replication will stop, whereas with drbd if a db file is damaged it is damaged on both nodes almost simultaneously. An additional benefit is that you can distribute big reads for better performance if your application is read intense. Distributing writes, although possible with proper circular replication configuration, provides no real benefit, the data must be written on both nodes anyways. Lastly, one node can be stopped for backup without impacting applications be move the IP to the other node, hot backups that require table locks can also be taken from the secondary node. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:linux-ha- > [EMAIL PROTECTED] On Behalf Of Sebastian Vieira > Sent: Monday, April 07, 2008 4:54 AM > To: [email protected] > Subject: [Linux-HA] mysql replication question > > Hi, > > I have a heartbeat cluster in which I'm planning to set up MySQL > replication. The cluster is an active-passive setup in v1 style (since > i > don't understand v2) with the following resources configured: IPaddr, > apache > and DRBD. > > Now, i can replicate mysql data with DRBD, but mysql also has a built- > in > mechanism. Also i've heard talk about MySQL Proxy, but i'm not sure if > i > need an extra machine for this (i only have the 2 nodes). My question > is > what is the best approach? > > Unfortunately i'm stuck with heartbeat 2.0.8. Yes, i know there are > later > versions available ... but not for sles10 *sigh* > > kind regards, > > Sebastian > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
