News for hackers. Stuff that matters.
Re:375 Million pageviews for $15 a month by StavrosK on Wednesday October 03, 2012 @12:02PM (#4608077)
Alternate title: Varnish can serve 375m pageviews/mo on a mostly-static site on an EC2 micro instance.

It's true, but I guess most people here know that.

Re:375 Million pageviews for $15 a month by uncoder0 on Wednesday October 03, 2012 @02:31PM (#4608927)
Also worth mentioning that there should be another $40 worth of data fees from amazon.

375000000.0 / 1024. / 1024. * $0.12 = $42.91

Re:375 Million pageviews for $15 a month by thezilch on Wednesday October 03, 2012 @12:05PM (#4608093)
In short, if your site is mostly or entirely static after the initial creation of a page, setup Varnish (or similar reverse proxy / web accelerator) to cache and serve your pages at a timeout rate you find acceptable.
Re:375 Million pageviews for $15 a month by steve8918 on Wednesday October 03, 2012 @12:12PM (#4608131)
This is a more in-depth article with almost the exact same information that was previously on HN a few months ago.

http://www.ewanleith.com/blog/900/10-million-hits-a-day-with...

Re:375 Million pageviews for $15 a month by dkoch on Wednesday October 03, 2012 @12:08PM (#4608113)
Of course the bandwidth bill will be a bit more than $15 for 375MM pageviews.
Re:375 Million pageviews for $15 a month by blhack on Wednesday October 03, 2012 @12:54PM (#4608381)
This is a pretty fluffy article, and a pretty linkbaity title.

500,000 pageviews/hr does NOT equal 375 Million pageviews/month. Traffic comes in bursts, and has peaks and valleys.

Re:375 Million pageviews for $15 a month by ksec on Wednesday October 03, 2012 @03:02PM (#4609090)
Exactly. I am guessing you would need at least 4 - 5 times the pageview/hr to handle a website with 375 Million PV/M load.
Re:375 Million pageviews for $15 a month by staunch on Wednesday October 03, 2012 @12:39PM (#4608299)
People forget how much we did with servers that had less horsepower than that ten years ago. Computers these days are really powerful.
Re:375 Million pageviews for $15 a month by orthecreedence on Wednesday October 03, 2012 @12:48PM (#4608344)
I agree. I think there's a balance between just throwing hardware at a problem versus trying to squeeze every bit of juice out of every box. I'm cheap as hell and actually like a bit of ops, so I'm more towards the squeezing side.

I've seen people install 4-6 webservers where 2 would have easily handled the load because they didn't want to optimize. I realize it's a viable strategy, but it makes me cringe...

Re:375 Million pageviews for $15 a month by pronoiac on Wednesday October 03, 2012 @12:05PM (#4608098)
Honest questions: Don't Micro instances get throttled under sustained demand? And aren't they lowest priority on the host?
Re:375 Million pageviews for $15 a month by riledhel on Wednesday October 03, 2012 @12:10PM (#4608118)
I think what gets throttled is the CPU, so if your instance isn't consuming too much CPU then you're fine. I believe that because he's using Varnish and a cache plugin he's not hitting the DB often, thus serving static content most of the time.
Re:375 Million pageviews for $15 a month by rquantz on Wednesday October 03, 2012 @03:06PM (#4609113)
It's funny that I'm seeing this today, since just yesterday I was reading about varnish. I've been given the task of scaling up my first big Wordpress site for a client, which has been running pretty slowly -- it's been getting about 3 million uniques per month. I'm thinking the nginx-varnish setup described in the article that appeared on HN a few months ago (linked to elsewhere in this thread) may be the best way to go, along with throwing some more hardware at it. Does anybody have any additional thoughts about this process for a noob like me?
Re:375 Million pageviews for $15 a month by pdog on Wednesday October 03, 2012 @12:28PM (#4608230)
Seeing this (supporting over 10 million hits a day on an Amazon EC2 micro instance), it makes less and less sense to host a site entirely on Amazon S3.
Re:375 Million pageviews for $15 a month by spindritf on Wednesday October 03, 2012 @12:31PM (#4608250)
The advantage of hosting a site entirely on S3 is the minimal administrative overhead. You don't have to configure, run, maintain, update and secure a server.
Re:375 Million pageviews for $15 a month by awj on Wednesday October 03, 2012 @12:46PM (#4608336)
It depends heavily on your needs. Some top-of-my-head pros/cons:

EC2 Pros:

* Cheaper

* Easier to handle infrequently-updated content

* (Possibly) a simpler application pipeline

EC2 Cons:

* Have to administer a server

* Not durable, have to handle backups

* Worse availability (S3 goes down far less frequently than servers)

That said, if I'm reading it right 10M hits/day on S3 will cost you $100/day (edit: as aidos noted, I'm high by a factor of 10 here) in hits alone, so the price difference here obviously is not small.

Re:375 Million pageviews for $15 a month by aidos on Wednesday October 03, 2012 @12:56PM (#4608396)
I think you're a multiple out - it'll cost you $10 / day; still not to be sniffed at if you're trying to keep costs down. You pay the same for bandwidth with either solution.

We used s3 for a flash sale that even big boxes (with varnish) couldn't cope with. In our testing s3 didn't even blink (35,000 req/second). Real severs can't come close to that for the same price.

Re:375 Million pageviews for $15 a month by awj on Wednesday October 03, 2012 @01:09PM (#4608444)
Indeed I am, that's what I get for envelope math.

I think there's a price/performance sweet spot where a small server with something like varnish makes a lot of sense. Move outside of it in terms of hits/day or acceptable cost/hit and S3 gets a lot more attractive, especially when you can slap CloudFront in front of it so easily.

Actually, looking at the CloudFront pricing, unless you plan on doing a lot of cache invalidations it comes out much cheaper than S3.

Re:375 Million pageviews for $15 a month by aidos on Wednesday October 03, 2012 @02:34PM (#4608942)
Cloudfront in front of ec2 would be cheaper (you'd potentially pay a lot to have it in front of s3). Also, we discovered the hard way that cloudfront is nowhere near as resilient as s3 under load (and if you need to do a cache invalidation you are pretty much screwed).
Re:375 Million pageviews for $15 a month by awj on Thursday October 04, 2012 @11:46AM (#4612857)
Can you expand on the resiliency of cloudfront? We've had great success after switching to it for hosting of map tiles, but possibly haven't pushed it hard enough yet. (I pushed it hard, but defining "enough" is very, very tricky)

Cloudfront in front of S3 isn't particularly expensive. Invalidations aside they're billed the same way and you're paying less per bit|request.

Invalidations, however, are a bitch. We've had a couple of times that we put up a map, found a problem with it, then decided to wait out the CF cache rather than pay for a bajillion invalidations.

Re:375 Million pageviews for $15 a month by aidos on Monday October 08, 2012 @03:25AM (#4625870)
I have to be honest, I can't remember how much load we tried putting on cloudfront during our testing. We may have just assumed that as cf is a regular cdn and s3 is a big one of a kind data store, s3 was going to be more resilient. We did load test s3 and it scaled linearly (with some caveats).

For our use case (a single huge burst of requests) we were willing to drop all caching and pay the additional money. It was absolutely worth it (and under non-sustained load it didn't cost much).

We actually used s3 as a sort of cache in front of realtime data. So the client js was accessing objects on s3 that were being refreshed every second. It worked incredibly well where other things (like gae, who disabled our account under load) had failed us in the past.

Re:375 Million pageviews for $15 a month by northisup on Wednesday October 03, 2012 @01:10PM (#4608456)
We should sell this bumper sticker: DISQUS, doing the hard work so you can scale your static site.