2006-11-07

Surviving Digg

There are a number of existing posts about how to survive a digging or a slashdotting. Recently I had to deal with this for bleenks.com, an online video site that a friend and I have been working on. The onslaught started at about 5pm on November the 6th, and over the next 24 hours we received over a million hits and 30k visits. So, here is the short description of how we survived. The page that was dugg was our home page. Step 1, view the source of the home page and save it to a file called cached_front.html. Step 2, add the following rules to your .htaccess file RewriteEngine on RewriteRule ^$ /cached_front.html [L] RewriteRule ^/$ /cached_front.html [L] RewriteRule ^/index.php$ /cached_front.html [L] RewriteRule ^index.php$ /cached_front.html [L] That's it. Now everyone visiting your home page is getting a cached copy. This took our server load from over 100 to less than 10. When you need to update the home page, comment out the mod rewrite rules, and update the source of the cached copy.

No comments: