Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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: stackoverflow.com/questions/8286815/… -- 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

1 Answer 1

There is a module for PHP available from http://pecl.php.net/mysqlnd_ms 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

 
discard

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.