I have serveral WordPress sites running on the same dedicated server. On each site, I use a auto content plug-in which posts content once or twice an hour. This is slowing down the sites because of load on mysql. I want to buy another dedicated server and use this as a database server only. My main server is in USA and the new one is in Germany. Will this be a probably due to lag and if so can I use some king of replication to counter this?
2 Answers
You should keep them as close to each other as possible. For every query, there will be a 200ms or so extra latency. I doubt the result will be good. If you must have servers in both US and Germany, have Germany as a replicated slave from which you read - while you write to the server in US. Be sure to monitor lag though..

- 4,330
- 5
- 32
- 46
Database servers and application/web servers should be in the same network. You will suffer considerable loss of efficiency in your system due latency issues. The web server and the database servers are in constant communication, experts recommend that the web server and the database server should have a dedicated network interface for their communications.
I`m pretty sure the replication will not solve this kind of problem. Replication is good when your single database server can't handle the load or you want to have a another server with your data and your database running in case one server crashes, but you still have to maintain constant network communication. You are not solving the problem by creating a replication, you are simply making the problem go to latency issues between the web and database server to latency issues between the main database server and the slave database server.
BTW, relational database replication just sucks, it`s really painful, you shouldn't do it unless you really have to.

- 695
- 3
- 8
- 15