I'm just beginning to consider using the Clustering available with CentOS. We are going to spec out some new hardware, and after reading most of the Clustering manuals, I have a small question about MySQL. I would like to run High Availability MySQL, in other words, similar to how you can run HA HTTPD and the like. The catch seems to be if I run MySQL on an individual server, with common MySQL replication to another server, how do failovers work? I see a real problem with table locking and the like. Is there a way to run multiple MySQL servers that get removed from the cluster as opposed to failing over when using the newer MySQL versions (I am running 3.23 now, so a little behind)? Thanks for any insights. Steve Campbell
On Dec 11, 2007 12:18 PM, Steve Campbell <campbell at cnpapers.com> wrote:> I'm just beginning to consider using the Clustering available with > CentOS. We are going to spec out some new hardware, and after reading > most of the Clustering manuals, I have a small question about MySQL. > > I would like to run High Availability MySQL, in other words, similar to > how you can run HA HTTPD and the like. The catch seems to be if I run > MySQL on an individual server, with common MySQL replication to another > server, how do failovers work? I see a real problem with table locking > and the like. Is there a way to run multiple MySQL servers that get > removed from the cluster as opposed to failing over when using the newer > MySQL versions (I am running 3.23 now, so a little behind)? > > Thanks for any insights.There are a number of ways to do it. We currently have 1 master mysql server, and multiple replicas. We then load balance the reads only from the replicas and writes go to the master database (all handled in the code). But I saw a presentation at the Boston MySQL Meetup.com group about how to do master-master in mysql 5. We're about to implement this in the next few weeks. If it's done this way both reads and writes to the db can be load balanced. We use linuxvirtualserver.org (heartbeat, ipvsadm and ldirectord) for load balancing. You might be able to contact the Meetup organizer, Sherri http://mysql.meetup.com/137/, she usually posts the presentations online. -- -matt
On 11/12/2007 17:18, Steve Campbell wrote:> I'm just beginning to consider using the Clustering available with > CentOS. We are going to spec out some new hardware, and after reading > most of the Clustering manuals, I have a small question about MySQL. > > I would like to run High Availability MySQL, in other words, similar > to how you can run HA HTTPD and the like. The catch seems to be if I > run MySQL on an individual server, with common MySQL replication to > another server, how do failovers work? I see a real problem with table > locking and the like. Is there a way to run multiple MySQL servers > that get removed from the cluster as opposed to failing over when > using the newer MySQL versions (I am running 3.23 now, so a little > behind)? > > Thanks for any insights. > > Steve CampbellAfter all the discussions regarding MySQL-style clustering (multi-master etc), what about a "classic" HA cluster for MySQL? Since the OP mentioned high availability, wouldn't the simplest solution be failover clustering (ie. single master with failover, shared storage, fenced nodes etc) via Centos CS? As I haven't done this myself I can't really comment further, but does anyone else on the list have experience engineering a Centos Cluster Suit failover cluster for MySQL? cheers Luke