News for hackers. Stuff that matters.
Re:How to Survive a Slashdotting on a Small Apache Server by CitizenKane on Sunday January 02, 2011 @10:54PM (#2062013)
If you want to save yourself the headache just use nginx, it responds much better under load than apache. If you're using a dynamic backend such as PHP, RoR, django or something else you can really boost the number of page loads with reasonable caching strategies.
Re:How to Survive a Slashdotting on a Small Apache Server by jrockway on Sunday January 02, 2011 @11:06PM (#2062040)
I just let Varnish do the hard work. I make sure my web app sets caching headers correctly, and then I just point Varnish at it. Instant 12,000 requests per second. I am sure if I spent time tuning the machine and setup, I could do even more. But my users make about 12,000 requests per decade :)
Re:How to Survive a Slashdotting on a Small Apache Server by iamjustlooking on Monday January 03, 2011 @07:46AM (#2062952)
Nginx also has good http caching built in. I use it in a heavy load scenario and haven't had a single problem.

http://wiki.nginx.org/HttpProxyModule#proxy_cache

Re:How to Survive a Slashdotting on a Small Apache Server by towndrunk on Monday January 03, 2011 @07:19AM (#2062909)
Maybe off topic but could you explain what the correct caching headers should be for a case like this?
Re:How to Survive a Slashdotting on a Small Apache Server by alnayyir on Monday January 03, 2011 @01:35AM (#2062365)
Varnish is great, and it's something I'd recommend to many people in many cases, but most people don't have their caching headers set granularly enough to not get caught off-guard by unexpectedly stale content at some point.

Gotta be careful, but if you know what to expect, Varnish is great.

Re:How to Survive a Slashdotting on a Small Apache Server by jrockway on Monday January 03, 2011 @03:59AM (#2062628)
Yeah, "web developers" should really take a few minutes to learn HTTP.
Re:How to Survive a Slashdotting on a Small Apache Server by alnayyir on Monday January 03, 2011 @07:31AM (#2062922)
Silly, how could they possibly find time to learn HTTP when they have to keep up with at least three blogs of mountebank victory bloggers in addition to learning the latest Drupal plugin?
Re:How to Survive a Slashdotting on a Small Apache Server by yummyfajitas on Monday January 03, 2011 @09:28AM (#2063199)
In that case, you are already screwed. There are likely to be other proxies between you and some of your users.