Using Coconuts - a Pythonic Blog

Username:

Password:


Don't have an account? Get one!
What should I write on next?
Duct Tape (non-techie) 1
Black Friday Web Magic (non-techie) 1
Open Source Gaming: Part 2 1
Open Source Gaming: My Turn! 0
Polls

Slashed and Dotted

Last week I wrote an entry about getting a virus on Linux via Wine, and I apparently struck a chord. See, I thought that the nerds at slashdot.org would like to read about this, even if it was just a few reads in the firehose, so I posted a story up. I did the same in the past with a couple other posts.

The next day, I was out in Manhattan with some other people from the college, having lunch at a very good Italian place whose name I forgot. I was having a delicious calzone, and I wanted to make my friends jealous, so I get on my iPhone's Facebook app to post "Nom nom nom calzone nom nom nom".

http://blog.opensourcenerd.com/upload/nom-nom-cake

However, it was to my surprise to find this on my wall: FILIP! YOU ARE ON SLASHDOT! ZOMG! your blog just went down btw. Awesomesauce. Remember to save your access logs. Well, as may be expected with being featured on the front page, my next wall post was: How do I restore my server when I'm on my iPhone at a restaurant???

The explosion of traffic was too much for my poor server. It wouldn't let me connect via SSH, and it was inaccessible via any other means. Reluctantly, I rebooted it. After about 15 minutes - down again. This happened another couple times until I got it to a somewhat stable state in which I stripped the server of any non-vital processes. End of the day hit count: 3,844. This was for less than half a day, as I got slashdotted in the mid-afternoon.

http://blog.opensourcenerd.com/upload/slashdotted-page-views

Courtesy of Google Analytics.

The next day: 6,243. The one after: 10,796. Apparently, not only did I make it interesting to Slashdot folk, but also to Redditers and Diggers. It has 498 diggs at the time of writing this - more than the whole bottle!

Like the bottle, though, all this traffic accidentally the whole server. There is not much I can do with an OpenVZ VPS with 256 MB RAM, burstable to 512 RAM. It wasn't an issue of processing power, but rather one of Apache not having enough memory to run the proxy from my local blog server to blog.opensourcenerd.com.

After spending hours trying to optimize how the server worked and failing rather miserably at doing things like installing a middleman program to do the proxy instead of Apache, installing Apache accelerators, and trying to multi-thread my blog, I finally contacted my hosting provider, and asked for temporary extra RAM. They granted it, and my server hasn't crashed since (thanks, Tim!).

Other apparently good decisions that I didn't take until that point were enabling Apache's mod_cache (to disk, not memory), and adding some Google AdSense ads to the page (I will remove it during low-traffic times, though). The former really improved performance, by avoiding the proxy entirely at times, and the latter bought me a $1 candy bar.

So, lessons learned? The most complex solution is not the best solution in an emergency. The obvious solution (caching, or getting more RAM in this case)... is. Not going down under heavy traffic is a plus of Blogger and Wordpress. And, last but not least, getting Slashdotted is a huge self-esteem boost.

http://blog.opensourcenerd.com/upload/happy-cat

Any of your own experiences of the kind?

P.S. Special thanks to the couple of readers who contacted me personally.

gz :)

on 2009-10-30 19:03:39.746078

Ted, your comment has been deleted for being derogatory and insulting. Please keep comments above an intelligence and respect threshold. If you have complaints, voice them: my contact info is here.

on 2009-11-06 21:16:39.669905
New Comment
You're not logged in! Log in to be awesome!
Format: BBCode ReStructured Text

Author (max. 20 characters):