Portal Home > Knowledgebase > Articles Database > Configuring your server to survive the Digg / Slashdot / Web2.0 effect


Configuring your server to survive the Digg / Slashdot / Web2.0 effect




Posted by aston, 09-12-2007, 03:18 PM
I learned the hard way last year when my website (on GoDaddy shared hosting) made the front page of Digg. GoDaddy suspended my account in a hurry (and didn't bother to inform me, but that's another story). I'm planning to get a VPS account with SLHost to prepare for future traffic growth. How should I configure the server to best handle a huge spike in traffic? From what I can gather, there are a number of factors: - Max HTTP connections (MaxClients in Apache) - Max number of open file handles allowed (a kernel thing) - Virtuozzo allowed TCP connections This post at webhostingtalk.com/showthread.php?p=4552677#post4552677 by Josh at SLHost outlines the defaults for their VPS servers: Should I do any tweaking to the defaults if I want to survive another Digg onslaught? Aston

Posted by Ashley Merrick, 09-12-2007, 03:34 PM
If you are expecting a Digg onslaught and you have a custom script then one thing you could do is make the script go into a lite version once the cpu load has gone over a particular amount. I have seen this with some large sites that started to get Digged they changed the page that the digg pointed to a very low bandwidth and cpu intensive page. E.g. removed all mysql functions from the page if possible and just displayed the content about what the digg is actually about. Out of the three things you've listen the only option you can actually change is the Max Http Connections, you want this as large as possible with your current specs of the VPS, but not to large that it swamps the server so much that nobody can connect to the server. Its better they receive a temporary unavailable page and then wait while someone views it and closes there connect and then refreshes it. However if you made the page a lite version then you could up the Max Connections to allow more people to access the page. Hope this Helps, Ashley

Posted by ServerMins, 09-12-2007, 05:00 PM
If you use dynamic php pages then caching compiled php scripts will help. I would try out eaccelerator fro this. Also other webservers such as lighttd and lightspeed have proven to hold up much better with a ton of connections.

Posted by plumsauce, 09-12-2007, 11:33 PM
test, test and retest. know what your server is capable of in the slashdot configuration. that way, you can approach that day with confidence.

Posted by aston, 09-13-2007, 02:17 PM
Thanks for the tips guys. AP-Ashley, what you said about the lite page makes a lot of sense. As far as the server parameters go, according to Josh @ SLHost, I can change the number of open files allowed as well. Doing a quick Google tells me that it's just a matter of changing a kernel parameter. Question is, do I need to increase it to handle a Digg effect? ServerMins: I have heard of eaccelerator, I'll look into it. Problem with using lighttpd is that my site (babevsbabe.com) is entirely dynamic. If it gets to the point where I need multiple servers (here's hoping), I could use lighttpd on the second box to distribute images. plumsauce: testing is good, but how? Can you recommend any good, free load testing tools?

Posted by plumsauce, 09-13-2007, 03:54 PM
aston, i would recommend "web application stress tool" which is a free download from microsoft. it can run on multiple testing stations coordinated by a master station.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Liquidweb? (Views: 721)
Sguil vs Snort (Views: 670)

Language: