Live data from Hacker News

10 Million hits a day with Wordpress using a $15 server

ewanleith.com

31–40 of 115 posts

Re: 10 Million hits a day with Wordpress using a $15 server

#31
post #9

A blog is the most simple to scale application, just one step after the static content. The fact that wordpress has traditionally been not very scalable always used to puzzle me...

As a PHP dev with ~100 WP installs under my belt and plenty of customization, I think I'm qualified to say that WordPress isn't written to be scalable. It's actually kind of crap. Many of the things it does to make writing plugins easier for newbies are Very Bad Things in PHP. WordPress is a memory hog, to the point that foreaching over query data in the wrong way can cause you to hit the memory limit, even if just unwinding your foreach into a copy/paste wouldn't. The memory leaks are somewhat nonsensical, and they make scripting with the WordPress API a minefield.

I'm not an expert on WordPress internals, but the scene is definitely ripe for a replacement simple due to the quality of the API. WordPress has been good enough for most people for a long time, but it has many weak points.

Re: 10 Million hits a day with Wordpress using a $15 server

#32
post #25

Earlier quoted context omitted.

Of course, all this really lets you do is survive a swarm of people from (for example) here, digg, a tweet meme, stuff like that, which will direct everyone at one single page on your site. But I think that's the most likely cause of that kind of traffic on a small cheap VPS, as anyone running a big site without clustering is just being silly :)

Yup, that's fair. And there are actually ways to scale WP beautifully with a small amount of servers (we're using less than 5 servers to handle our 10M visitors a month and content archive). Again, I keep meaning to blog about it, I just need to find the time. Anyways, I'm all for articles like this that help optimize WP sites and get rid of the stigma that WP doesn't scale without cost. Thanks for writing it.

Thanks :)

Hope I see a blog post from you about it sometime soon, I think the details around that kind of stuff are far too hard to discover for people trying to learn about it.

Re: 10 Million hits a day with Wordpress using a $15 server

#33

As someone who worked as lead dev for a blog network that does 10M+ visitors a month, here's the thing: if you've gotten your blog to 10M hits a day, you likely have a massive amount of content (we had about 1M posts over 5 or 6 years and about as many comments); that is, far too much to get into cache on a $15 server. Every page gets cached, every gallery page gets cached (if you've got photo galleries), every comme…

its an interesting academic investigation. In theory, you could do 10M pv/day with a relatively small archive. I bet some recently launched sites that take off quickly (PandoDaily for example) probably do decent traffic levels with a pretty small number of posts, that would probably fit into a small cache.

But that's all theoretical. There's no way someone running a site with that kind of traffic should be running on shared resources without an infrastructure. When that $15 server needs a reboot, the site is offline, and that would be a significant amount of lost traffic.

Capacity, speed, redundancy and cost of downtime... You really shouldn't run on this kind of architecture.

Re: 10 Million hits a day with Wordpress using a $15 server

#34
post #23
post #8

Earlier quoted context omitted.

Pretty much, yeah - though if you don't know what settings to put on nginx and varnish, you'll end up wasting most of the performance. I'm sure my configurations aren't perfect, but they're a lot better than the defaults they ship with, and there doesn't seem to be a lot of "Here's some sensible settings" discussion on either project's website.

Your VCL ignores the fact that logged in users are going to have cookies and every request would then be piped to your backend. Stripping off the right cookies will allow those requests to be cached. https://www.varnish-cache.org/trac/wiki/VCLExamples At the bottom are some example templates that are a bit more tuned for production sites and are in use on some relatively large WordPress sites - last August, they clai…

Thanks - I half knew about the cookies, but didn't worry about them as most people going to my site (or most other blogs) won't actually be logged in.

Didn't touch shmlog configuration, or threading - everything I changed is on the post. I tried to keep it simple enough, in the end Varnish alone is probably enough for 99% of people.

You're right though, I should look at those VCL examples you posted, and thanks for taking a look through the files themselves, very helpful :)

Re: 10 Million hits a day with Wordpress using a $15 server

#35
While I agree with the main point of the post(optimization, caching)the title is a bit of an exaggeration.

On a normal website 10M hits will not be evenly during the day this example hits are only an avarage of 10Kb, and the number of concurrer users are only 250.

Also the test seems to be done on a new wordpress installation. The more content you have, the bigger the database,the longer the comunication with your DB, the bigger the cache, ect...

In a real world scenario you proabbly would need something more than a $15/month virtual server to handle 10M hits in a single day.

Still optimization is always a good thing.

Re: 10 Million hits a day with Wordpress using a $15 server

#40

Will the bandwidth not cost way higher on AWS than the $15 mentioned?

Mmm, your right it'll cost something, though AWS free tier covers 15GB per month of bandwidth, then 12 cents per GB after that, so I'd expect it to be a few $.

Obviously though, there's cheaper options than AWS out there - Linode include 200GB of transfer per month in their $20 option.

I mostly just used AWS because I could start the server, build it, and blow it away, then restart, all without any hassles or full monthly chargers.

Post reply on HN