One of the big complaints that the anti-Wordpress chorus croons is that the vaunted blogging platform doesn’t scale. Certainly we’ve all seen sites brought low by the “Slashdot Effect” or the “Digg Effect” but my experience tells me that WordPress is getting a bad rap for poor server setup, poor plugin choice, etc.
How do I know? Well, one of the sites I work with last week experienced the “China Syndrome” or potentially “The Great Fire Hose”. The site, TheTruthAboutCars.com posted a story that the Chinese might buy GM, and that opened the flood gates for traffic. The problem is, while we watch for excess traffic from Digg, or Slashdot, we don’t watch the Chinese sites that offer similar service. In a matter of a couple hours, the traffic surged to 10 or 15 times its normal levels(and that’s conservative, once we max out server connections, we have no way of knowing how much is actually refused). Our system administrator alerted me and I quickly through the SuperCache plugin into lockdown mode, ensuring that the site rendered virtually all its content as flat html, rather than going to the database every time.
A strange thing happened. The server remained up, but literally we swamped the number of available connections to Apache. If you got a connection, you could surf the site fairly well. If you didn’t, you got a fail to connect message. So after some general hand wringing (and too much time), we reconfigured the site to work in our load balanced cluster. Problem solved, but not without a lot of pain for those of us who are responsible for making sure that kind of thing doesn’t happen.
This is the kind of thing that is the down side of success. The editor of TheTruthAboutCars.com has been a voice in the wilderness for years, screaming that the emperor had no clothes, with respect to the Auto Industry, particularly that they were in deeper financial trouble than anyone realized. The past couple weeks have revealed The Real Truth About Cars – and that could be summed up as “Robert Farago was right.” In retrospect, we should have expected a big traffic surge, it’s just that I don’t think we would have expected all of China to visit, at one time.
- China is an Internet powerhouse.
- All hail the Super Cache Plugin – it rules!
- Server configuration is key – always think about the next step you might have to take to add capacity, and most importantly, think “how do I take the next step when I’m under fire…”
- Make sure you have traffic warnings in place so you are alerted BEFORE you are in trouble with excess traffic. We use Akamai DSA which makes this much easier.
- If you get a massive traffic spike, take action immediately. Don’t wait, because it won’t get better. Go to lock down mode, and add an extra server or two if you can (yeah, I know, not all of us have the luxury…).
- Consider having the editors (if there is more than one) schedule their posts for the top of every hour, rather than just hitting the publish button. This will keep Super Cache from being flushed every time a post goes live.
- Again, live stats plugins rear their ugly head – This site was using a plugin that counted every time a post was viewed. This got ugly. If you really need that type of functionality perhaps you ought to use something like MyBlogLog.com and get the pro edition. It offers live tracking, but it does it off server. Any thing that wants to open a database connection every time someone views a page is downright dangerous.