[Linux-cluster] Clustering MySQL DB

Robert Peterson rpeterso at redhat.com
Fri Dec 1 16:36:09 UTC 2006


Mehdi Sarmadi wrote:
> Hi
>
>  Thanks Robert, I've read that. I'm just wondering what model does RH
> Cluster Suite uses for clustering MySQL. I know much about MySQL
> Cluster & Replication. I'm looking for cluster suites e.g. Redhat or
> Sun. I wonder how cluster suite cope with
> - known replication problems and
> - cluster unawareness of MySQL engine and
> - shared-nothing policy that mysql does.
>
>  I heard of something here:
> http://www.redhat.com/archives/linux-cluster/2006-June/msg00158.html
>
>  Afterall, I look for what Redhat proposes and recommend for
> HA/Failover and Clustering for MySQL.
>
> Looking fwd to your reply
> Best Regards
Hi Medhi,

I'm not sure what you mean by "what model" RH Cluster Suite uses.
I don't know the answers to MySQL-specific questions regarding
known replication problems, cluster unawareness and share-policy.
I also can't speak for what "Red Hat Recommends" but I can perhaps
tell you what I know about the topic:

- Cluster Suite is able to do High Availability (HA) MySQL
  with active/passive MySQL.  That is, have a single MySQL server
  in a cluster, and if that server goes down, another node in the cluster
  takes over its MySQL server duties.  No problem.
- To accomplish this, I recommend using GFS file system on shared
  storage, because then updates made to the MySQL data will be
  seamlessly seen by the other nodes that are standing by (passive).
- If you don't use GFS and shared storage, then you might be able to
  have multiple MySQL servers running simultaneously on their own
  copies of the database (Active/Active).  Then, of course, you run into
  problems of how to replicate the data properly, which is what you
  were probably talking about with replication problems and share
  policy.  I'm sorry, but I can't help you there.  If you could solve those
  replication issues, you could then use something like LVS / Piranha
  to do load balancing of the MySQL requests.
- Since normal MySQL isn't cluster-aware, I think database updates
  from multiple servers (Active/Active) over GFS are likely to cause
  database corruption unless you're using the "MySQL Cluster"
  product which I don't know much about.
- Other people on this list have talked about getting multiple MySQL
  servers (Active/Active) to work cooperatively over GFS without
  corruption as long as they're not updating records.  In other words,
  just for read-only queries.  I'm not sure what kinds of things they
  need to get this to work properly.  There was a thread in October
  in linux-cluster under the subject "Multiple Active MySQL
  instances", but I don't remember what all was said.  I do remember
  them saying that it only works with MyISAM tables.  I recommend
  reading the archives, at this link:

http://www.redhat.com/archives/linux-cluster/

  If they have gotten this working, then again, you could use LVS
  to do load balancing if you want.

I hope this helps.

Regards,

Bob Peterson
Red Hat Cluster Suite




More information about the Linux-cluster mailing list