Live data from Hacker News

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

ewanleith.com

11–20 of 115 posts

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

#11
post #2

What about memory usage with MySql? I've found that to be a significant bottleneck with wordpress sites. A basic wordpress installation doesn't use the database much, but if you add just a few plugins, things start to jump pretty quickly.

Varnish takes the load off by caching the results from Wordpress. The Total Cache plugin handles purging cache entries when you update posts/pages.

If you want to see how many queries Wordpress runs even for a simple post install this plugin I wrote at my last job. It shows a log of queries in the page footer if you are logged in as admin.

http://wordpress.org/extend/plugins/wpdb-profiling/

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

#12
post #4

TL;DR - Vanilla ubuntu, configure firewall, install nginx, install wordpress, turn on wordpress caching, install and configure varnish.

Isn't there any kind of static generator for Wordpress? I'd expect a static wordpress + nginx would be sufficient to handle quite a serious load.

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

#13

This is good but let's look at from slightly different perspective. The author (Ewan) is so good, so I'll assume his hourly cost runs anywhere between $50 to $80 an hour on sys op. Taking the least denominator - $50, if he spends just 5 hours a month trying to keep his server alive, active, update and making sure it's not down, responding to it if anything happens - that will cost him $200 + $15 per month to maintain…

I agree with your reasoning that it might not be worth the time, but I think spending five hours a month on server upkeep is a little steep. I've got two Linodes running and I rarely spend more than an hour a month on server-related issues. Of course, I don't have millions of views, but if that's the case, my assumption is that this high traffic would come with enough revenue to make it worth my time.

So yes, I agree with your sentiment, but once you have servers up and running with good tools they don't take that much effort.

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

#14

This is good but let's look at from slightly different perspective. The author (Ewan) is so good, so I'll assume his hourly cost runs anywhere between $50 to $80 an hour on sys op. Taking the least denominator - $50, if he spends just 5 hours a month trying to keep his server alive, active, update and making sure it's not down, responding to it if anything happens - that will cost him $200 + $15 per month to maintain…

This setup is very unlikely to take four hours a week to maintain.

Hell, it takes 15 minutes to set up.

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

#15
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...

Whats more puzzling is the need to render things from the sever when you just want to show people posts, which are really just static stuff. Thats why I love Jekyll.

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

#16
post #8
post #4

TL;DR - Vanilla ubuntu, configure firewall, install nginx, install wordpress, turn on wordpress caching, install and configure varnish.

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.

Didn't mean to minimize the contributions made in the article - fully agree that proper settings matter a lot. The attention to detail in turning off unnecessary cruft was great. Loved the sudo ufw logging off.

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

#17
post #16
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.

Didn't mean to minimize the contributions made in the article - fully agree that proper settings matter a lot. The attention to detail in turning off unnecessary cruft was great. Loved the sudo ufw logging off.

Thanks - I mostly wrote it because I'd spent so long playing around with settings I realised I had no idea which ones made any difference anymore, so started again.

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

#18

This is good but let's look at from slightly different perspective. The author (Ewan) is so good, so I'll assume his hourly cost runs anywhere between $50 to $80 an hour on sys op. Taking the least denominator - $50, if he spends just 5 hours a month trying to keep his server alive, active, update and making sure it's not down, responding to it if anything happens - that will cost him $200 + $15 per month to maintain…

You're absolutely right (except about me being good, I don't know about that), and if someone asked me about hosting Wordpress for a serious business, I'd probably just tell them to use WPEngine or similar.

But as a learning experience for me, I think this has been pretty priceless, and I enjoy it, bizarre as that probably sounds to the people who don't read HN :)

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

#19
post #6

Try it again with just the last step(vanilla apache/vanilla wordpress/varnish) what are your results like? Keep the original setup and have your test script perform some random searches. New figures? (Everything is fast/non-server intensive when you're serving static data)

Just tried:

This rush generated 7,363 successful hits in 1.0 min and we transferred 56.39 MB of data in and out of your app. The average hit rate of 117/second translates to about 10,159,286 hits/day.

So you're right in that Varnish is the big improvement, but the CPU of the server seemed to be significantly higher with varnish alone than with varnish + APC.

Of course, one issue with these systems is there's no such thing as vanilla, the documentation goes from "Install" to "Read 100 pages of stuff to get a working configuration", with nothing in between...

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

#20
Great post, the 10 million hits is a bit misleading, WordPress is a cookie monster, so your default configuration of Varnish is going to have issues, when people start adding comments etc.

WordPress itself isn't the scalability problem anymore, it's usually how the blog is being used, and when the db needs to be interacted with.

At the same time, a lot of our customers use WordPress as a CMS, and have static home pages and sub pages, which we serve in a similar fashion.

https://github.com/zippykid/php-varnish the plugin there, will be handy when you actually start making blog posts.

Post reply on HN