2 ms·
You could modify Wordpress to scale without getting rid of MySQL. You would have to modify Wordpress to use a master/slave setup so that reads came from a clus
by byoung2 16y ago
You could modify Wordpress to scale without getting rid of MySQL. You would have to modify Wordpress to use a master/slave setup so that reads came from a cluster of read-only slaves, and writes go to a read/write master. You would also take advantage of static file caching.
Most Wordpress installations are going to be more read-heavy than write-heavy. Take a typical tech blog like Engadget or Techcrunch...there will be a handful of authors, dozens or hundreds of commenters, and thousands to tens of thousands of readers at any given time. You should be able to handle this type of load using static caching and a master/slave database.
For users who aren't logged in, serve pages from a static file cache with a 5 or 10 minute timeout. They won't notice that the latest comments aren't there anyway, since they aren't commenting themselves. You can scale this static cache very easily with Varnish, nginx, etc.
For users who are logged in, serve pages from the database, using a cluster of read-only slaves. This way, they see the latest comments, but since they are being served from slave servers, you can scale this very easily. You could use static caching in front of this setup as well, with a shorter timeout (maybe 30 seconds or less).
For the very small percentage of logged in users who are actively commenting (or performing other activities like voting on polls, rating posts/comments), use the write master database. This will usually be a very small number (dozens to hundreds out of tens of thousands), so load shouldn't be an issue. If you have a particularly active community, you could set this up as a circular replication cluster with multiple write masters.