hiptobesmart
Veteran
Just Getting Started
Member Likes (0)
I have one web server which will be connecting to two database servers set up with 256 databases in a master/slave configuration. I have installed wordpress, set up my network, placed the multi-db files in their proper location and the configuration seems to be lost on me, which is embarrassing due to the fact that I am a web developer and intermediate server admin.
Both servers are on the same network (same data center). Here are my questions:
1. Do I simply duplicate the add_db_server calls for the slave server with different host information and the write flag set to 0?
2. Can I get a clear definition of the HOST and LAN_HOST arguments in the add_db_server function? The values in the sample config seem reversed to my understanding (host being external IP and lan_host being internal IP).
Any help or examples you can shoot my way would be very helpful :)

Responses (3)
Developer (joined June 2008) Likes (0)
Answering the two questions separately:
Yes - if you want to prioritise reads from the slave then set the read value for those to 1, and those for the dbs on the master to a higher number e.g. 2 or 5 - doesn't matter with a single master / slave, but that number will be more important when you add more slaves.
Developer (joined June 2008) Likes (0)
If both server are in the same datacentre then you can ignore them and put the same IP / address in both.
If the server is in the same datacentre the plugin will use LAN_HOST, if it isn't it will use HOST
Member (joined September 2010) Likes (0)
A thousand thanks, Barry :) I'll give it a shot.
Become a member