I am working on a drupal version 7 project and I would like to know what is the best practice for the database resilience of Drupal.

We are going to use MySQL 5.6 entreprise edition on physical servers, in an master-master replication with one master read only.

I wanted to know how most of you are dealing with the failover of the database? Ideally we would like to be able to failover automatically in a disaster recovery scenario. I was thinking of using our loadbalancer to detect the failover and redirect the traffic using netscaler datastream in an active passive scenario. For the point of view of MySQL, we would like to have a MySQL ha solution which monitor the database back ends.

The content side of the drupal application is using a gluster solution in an active active node which is mounted to all the app server.

If you have any implemented solution I will be happy to hear about it.



Sam Moore’s picture

You might enjoy this group: https://groups.drupal.org/high-performance
While not specifically confined to MySQL, there are a lot of folks there who have the same concerns.
Also, have you looked at MariaDB? It's a replacement for MySQL, meant to be transparent to the application ("drop-in replacement" is the language they use) but optimized for our kind of performance needs.

pascal44’s picture

Thanks for your comment.
Do you mean that drupal will be using more Mariadb in the furture?

Sam Moore’s picture

I don't believe that's in the roadmap.

pascal44’s picture

thanks Sam

noahzenzen’s picture

Sorry if this doesn't exactly match this thread but it's the closest, most recent thread I could find. I'm trying to set up a dedicated failover scenario but am running into an issue toward the end of this project.

Here's what I have:
Production - Ubuntu 12.04LTS server running apache 2.2, MySQL 5.5, and PHP 5.x
Failover - exactly the same configuration

I'm using rsync to replicate the /www directory every 5 minutes and have successfully started a master/slave mysql configuration. The production server works great and when I view the main page of the Failover server it looks like it's working. If I try to log in or navigate to a page other than the default home page I get a 404 error saying it can't find the node.

What am I missing? The only thing that I can think of is the Failover DB is in a read-only mode causing the problem. I just don't know how to switch from ready-only to write (assuming that's the actual issue).

Anyone have any suggestions?

noahzenzen’s picture

I thought that the .htaccess file was there along with clean URLs being configured. For some reason those weren't on the DR server. I was able to get it to work with those changes!

pascal44’s picture

How did you manage the failover of the database at drupal, meaning drupal understanding that the database is not at the master site anymore?
what kind of organisation did you do this drupal site?

I have setup a master / master replication with one master read only on MySQL enterprise 5.6.14. we have try to do a failover and the application did not go to the second master.

any help will be great. Thanks