3 ms·
> This is fine, up until the point where you get on HN and Reddit at the same time Incidentally, you don't actually need much to handle that. Our web server i
by wheels 15y ago
> This is fine, up until the point where you get on HN and Reddit at the same time
Incidentally, you don't actually need much to handle that. Our web server is a wimpy 256 MB VPS and we've had (Wordpress) blog entries hit the front page of HN and Reddit simultaneously and weather the storm without missing a beat. An appropriately setup Apache + Wordpress SuperCache does the trick just fine. (Hint: The default Apache configuration isn't "appropriate".) You're not going to hit anywhere even close to 2k requests per second on the front page of those two.
- timdorr 15y agoIt depends on the content. If it's something that will be visited just by HN/Reddit users: Sure, you're not going to get 2k/sec directly from them. But if it's something that's going to get shared/tweeted/retweeted/blogged/reblogged/etc., then you will be looking at huge traffic numbers. It just depends on how viral your content is and how far it spreads. It's the long tail that matters.
- wheels 15y agoYou've really got to hit the jackpot to get up to 2000/request per second (assuming you don't already have a high traffic site). Assuming about 20 requests per pageview, that's more than a quarter million pageviews per hour. I've had things go moderately viral (thousands of tweets / retweets) and you don't get anywhere near that. Pre-tuning for hitting the jackpot is in most cases going to be premature optimization.
- seanp2k 15y ago...and you know what they say about premature optimization; "if you write something that people want to read and your site is down, you will look like an idiot" wait, no, wait, that's not right at all. Maybe: "W3 Total Cache will save your site and takes all of 5 minutes to configure" Hmm, nope. Perhaps: "Cloudflare is free and you can probably sweet talk your webhost into setting up the whole thing for you" No, no, no, no. Wait, what were we talking about?
- nknight 15y agoSpikes of 2000/second are not unrealistic, and part of the problem is that once the spike hits, inadequately designed applications start to wedge on lock contentions and just plain inadequate CPU, the VM layer starts swapping, people trying to get to your site start hitting reload (humans do not have an exponential back-off function), and the whole thing comes crashing down until traffic drops off to more sustainable levels.
- asto 15y agoPremature optimisation is premature until it's not. Caching is an easy boost and is among the first things I enable on a wordpress or drupal install.
- phillco 15y agoHell, I've been on shared hosting and handled getting frontpaged by HN and Reddit just fine. <3 WP Supercache.
- jmtame 15y agoI'm on a 512 Linode, and my Wordpress would freeze when I got on the front page of HN. I ended up turning Apache's Keep-Alive to off and installed W3 Total Cache, haven't had any problems since then.