Does it work to have like an MySQL (or any other relational database) on the GFS (with DRBD) and have multiple nodes reading and writing to it? Is that the "best" way of providing a HA database/application setup if so? Is RHEL (cluster suite) a good way to set up this? (or centos)


DRBD only works with two nodes. If you use it in a primary/primary setup, it will indeed allow you to have some sort of high availability.

I wouldn't recommend GFS, it is really slow. DRBD is slow because it needs to replicate data over the network, if you add on top of that a slow FS, you're looking for trouble. By slow, I mean slower then DAS.

The replication features included with MySQL are a mess. It's already quite complicated with two servers but with circular replication, it's just crazy.

For DB servers, I find that the best solution is to use the replication features included with the DB system. Using block replication could potentially lead to data corruption which would most likely crash the server.

Imagine this, you have a master/master setup using DRBD/OCFS. What happens if you do an insert in the same table of both hosts at the same time (+/- 1ms) ? How is DRDB/OCFS supposed to know how to order the tuples ? The replication features of the DB software will know how to handle this while DRBD/OCFS is not meant to handle such things.

Therefore, use the MySQL replication features and crash test them. Try to pull the cord on one server and see what happens when it comes back online. Try to pull the cord on both and see what happens when they come back online. Do many simultaneous insert and updates on both at the same time.

For more then two nodes, consider MySQL Proxy.

  • Or MySQL Cluster if you're daring. Apr 28 '10 at 10:35

mysql circular replication + drdb + heartbeat worked in several setups.
you just need to tune it.

regarding multiple nodes reading/writting i'll give a try to mysql proxy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy