Ok, the wp-cache plugin for wordpress has been out a long time. It works great. Whoop-dee-f'ing-doo. Not exactly new reading, even if it is handy. After reading another page where I feel I lost 30 seconds of my life there, I thought I'd write something. The idea of caching is an obvious one when it comes to getting hit with a digg effect, a slashdot effect, whatever. The idea is that generating the page over and over takes resources. You take out generating the page, you take less resources to deliver content. Not exactly a new concept. The thing is, a plugin won't always do you any good. Quite a lot of the world has websites that are not blogs. Many people use php so php pear's caching, and smarty's built-in caching work nice and easy to solve this. Ok, this is the order I would do it if digg is slamming your server hard. More than likely, you have no caching on. 1. Grab a copy of the page, and make a static html file out of it. Voila, there goes 90% of your load(you still beat the crap out of Apache however). This keeps your server up for the moment. I say Apache because i prefer the LAMP setup, but caching is simple in asp.net as well. 2. Fix your code so it actually caches pages for at least a few mins. Even the best-optimized sql queries take time. Unless you have a decent dedicated server, the caching is a great idea. Hell, it is anyways unless you really need the page to stay fresh. 3. If neither, redirect your traffic to a mirror of your page to alleviate the bandwidth/cpu beating. Now, hopefully when you build a site(if you code it yourself), or even if it's pre-packaged, you should run apache's ab stress tool against it and see how long it takes for your server to start to howl. Set it for a least 50 concurrent connections to simulate a good digging. It tosses out a nice little report at the end to let you know how you held up. Personally, I think everyone of those "survive the xxx effect" come down to caching. Without it, there aren't many servers that can take generating that fast. This is for dyanmic content, I should say. Not much to say, but I just thought I should throw in a couple of cents too.
Please Rate this Article 5 out of 54 out of 53 out of 52 out of 51 out of 5
# of Ratings = 1 | Rating = 5.0/5