Friday, January 10, 2003
Notes on surviving a Slashdot Effect
If you read “meta” sites like Slashdot, Kuro5hin, Fark, Met4filter (natch), and Memepool you've probably encountered links to stories that you can't reach—namely because the act of linking to a server not prepared for massive traffic has brought down the server, or worse, put the hapless soul over their bandwidth cap denying any use to anyone for the rest of the month or day or whatever time period the ISP or hosting provider uses to allocate bandwidth.
Mark and I have often gone back and forth about what we would need to do to survive a slashdotting if we ever got linked. Most of the solutions we've come up with so far center on distributing the affected site(s) to other servers and round-robining (is that a term?) between them (or some other form of load balancing). So far, that hasn't been a problem (and thankfully—we both have fears of being slashdotted and finding the slagged remains of the 33MHz 486 that is currently our server).
But one of the
suggestions in the “The ethics of
linkage” is to redirect all requests back to Google as they can probably
can't be slashdotted at all. By using mod_rewrite
you can probably do something along the lines of:
RewriteEngine on RewriteBase / # untested! Use at own risk! # be sure to change domain after "cache:" as needed RewriteCond %{HTTP_REFERER}% ^http://.*slashdot.org.* RewriteRule ^.*$ http://www.google.com/search?q=cache:boston.conman.org/$1 [R][L]
But it would only help if the URLs that are being slashdotted exist in the Google cache; otherwise it does no good. For instance this entry, the very one you are reading now, has yet (as of January 10th, 2003) to be read and cached by Google, and it probably won't be cached for some time. So I can only hope that if this article gets slashdotted, it's after Google has googled it.
Which means that it is still a good idea to think of other ways of surviving a slashdotting, but for an ad-hoc method, this is probably a decent solution until we get something better into place.