[HyperDB] separating reads and writes

Emiliano Compean e.bardomiano at gmail.com
Mon Apr 6 17:27:08 GMT 2009

We have a cluster of wordpress front-end servers and want to separate reads
and writes between mysql master and slave servers.

In my db-settings.php file I have something like:

//read db server
add_db_server('global', 0, 'lan', 1, 0,'','','xxxx','xxxx','xxxx');

//write db server
add_db_server('global', 0, 'lan', 0, 1,'','','xxxx','xxxx','xxxx');

So basically, I want all reads to go to one server and writes to another.
Is this correct?
In my testing, I'm using MONyog (www.webyog.com) to compare usage stats
between the servers.  In this config, the charts show  reads
still going to my master server. This is why I would like to confirm that my
configuration or expectations are correct.


More information about the HyperDB mailing list