6

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 ?

3
  • 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. Commented Nov 12, 2011 at 9:48
  • I don't exactly feel in the mood of hacking Drupal database layer...
    – tostinni
    Commented Nov 13, 2011 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
    Commented Nov 27, 2011 at 16:17

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .