Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a standard MySQL Master/Slave replication for our database. In order to use the slave server we have set up MySQL Proxy. However we have been strongly discouraged to use it as it still alpha and not very well supported.

Our application is built with Drupal 7 which doesn't use very effectively its slave database (see my related question on Drupal Answers).

What tools could we use to act like MySQL proxy and send SELECT queries on the slave server in order to distribute the load ?

share|improve this question
IN the long run best solution would be to modify the application to use two different database handles, one for SELECTS and one for other. It could be possible usually to replace the normal database handle with your own object should you have one. – anttiR Nov 12 '11 at 9:48
I don't exactly feel in the mood of hacking Drupal database layer... – tostinni Nov 13 '11 at 0:02
seems, that i just asked a related question at stack overflow:… -- mysql proxy is a great tool and i've used it for years for an other site, but it does not work for drupal, as it seems ... did you find a solution for this? – harald Nov 27 '11 at 16:17

There is a module for PHP available from which does master-slave splitting and load-balancing from inside PHP. I don't now if anybody has tested it with Drupal, though. But as it allows a custom decision logic where to send queries it might help.

See also the documentation and Ulf Wendel's blog.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.