Hacker News new | past | comments | ask | show | jobs | submit login
My Raspberry Pi WordPress server survived the front page of Hacker News (vo3.net)
86 points by jstalin on Dec 1, 2012 | hide | past | favorite | 34 comments



Kids today. The Raspberry Pi has a 700Mhz processor and at least 256M of memory. In 1999 I was running an mp3 search engine that processed 200k daily queries at its peak, on a Pentium II with 128MB.

Serving static pages at the rate HN can generate requires less resources than playing any game on your phone.


I don't think this is a totally fair comparison, because anyone who knows how to code their own site (/service) is already at a major advantage.

Now, if you downloaded an off-the-shelf MP3 search engine package and merely hosted it, it'd be different.

I also don't think that surviving a sudden upsurge in traffic is a particularly impressive feat just because it's Wordpress. If anything, it highlights how inefficient Wordpress is, which might possibly be a result of trying to be easy to set up. And a lot of the people who do use it don't realise how much worse they make it by adding plugins.


Maybe this is a better take-away when comparing the two:

This is a showcase of the progress of such inexpensive, accessible, and miniaturized (embedded) hardware over the course of a little more than a decade - back when we needed much more bulkier and expensive PC's. Yes there are better examples of things that can fit in your pocket and do the things of yester-years N times better, but I still like seeing such raw and transparent examples. Extrapolate this by another decade, it's nice to imagine about what's coming next.


I agree that the site holding up to traffic is nothing special. However, the server operates on less than a 5 watts, costs under $50, runs on a flash disk (still faster/bigger than disks back then), and can fit in your palm - that is what really is impressive.


It's really not that impressive. You're probably surrounded by such computers every day, you just don't host some static HTML on them.


So, you blogged about your blog, posted the blog about your blog, then blogged about the traffic you got from that post, then posted that blog as well.

I'm going to go outside and play now.


...and it was still worthwhile.

Cool hack, interesting results, relevant to many peoples' businesses. Nice work.


And you clicked on it :)


You forgot the bit where when blogging his blog went down (for me), and it's also down now (for me).


Are there people that blog and then not post it?


The title is wrong. Like you said in article, it's not a WordPress server but only a nginx serving static content.

Only 2 persons hit PHP on your Pi, you when you edit posts and the first visitor for cache generation.


This is how caching works in the real world. Everywhere. For a CMS delivering mostly static data this is a perfectly fine way to do it.


Not quite everywhere. When you have enough traffic, the load spikes resulting from putting cache generation in the user path becomes seriously painful, so often a separate process is responsible instead.

(Imagine 5,000 threads all deciding they want exactly the same data at exactly the same time, then trying to write it to exactly the same location. Now imagine 50,000 more threads trying to do exactly the same thing because of the delays caused by the first set. Now imagine your web site is down and your mobile phone is ringing)


Yes, the thundering herd problem. While the site may be briefly less responsive, if the traffic is all to a single piece of content as long as one of them goes through you'll end up with the content in cache and then the load immediately drops.

The bigger problem is when your entire cache is cold (ex. memcached was restarted) and there's a ton of traffic to lots of different content. A single piece of content should not be that crippling, unless it's stupidly-slow to render and cache.


Caching plugins are a prerequisite for Wordpress to survive heavy traffic though, even on much more powerful servers. Anyone who knows what they're doing is using one.


I know and every regular readers of HN knows, it's my point. Pi can serve statics, ok, we all already know it, what's the news?


one thing to consider is to send all of your logs over the UDP syslog service to a collector like splunk or another server that just listens on UDP and writes them to disk. will save you the trouble of hooking up an external disk to the raspberry pi device and start you down the path of centralization and management.


Hahaha. It is not accessible now


Is this running from home?

If so, do you have a static IP? Does your ISP allow home servers?


Not the OP, but it seems that my comcast IP stays pretty stable (for months on end). Also, I know that namecheap (and possibly others), provide a dynamic dns type api to update their nameservers if your ip does change.

Certainly you wouldn't want to host something too important on your home network, the odd mumble server or webpage shouldn't be too big of a problem.


I do exactly this--I use namecheap's dynamic DNS thing and a Comcast home connection to serve my personal website. Namecheap lets you update DNS with a GET request to a URL, so I just set up a cron job to do that every night. Works great.


My comcast ip hasn't changed in 5 years. Although I have to use the mac address of a long defunct computer nic I had 5 years ago.


Yes, running from home on a dynamic IP. As another commenter says, my comcast IP is pretty stable.


Raspberry Pi should be able to happily serve up to 50-100 requests per second for static files. That's up to 360k requests per hour.

Didn't Raspberry Foundation website run on Pi itself?


I think there's a lesson here about how proper caching really gives life to weaker hardware. I only bring this up because I remember when the term "the digg effect" was used for the first time. I also remember people testing services like MediaTemple to see if it could stand up against the incoming traffic. There was so much focus on having beefy hardware when really all everyone needed was better caching.


Caching is only needed in the first place because wordpress generates hundreds of sql queries on a page load. It probably does more queries then Amazons homepage.


Survived? It is down now, and it was down when it hit the front page the last time… But true, I don't belive that it has started to burn or anything.


Ironically, it is down now.


It was also yesterday.


I felt really naughty upvoting it. Glad to hear it survived.


And it looks like it's holding up again ;)


Not the second time, no.


This sounds like a challenge, boys.


Not working right now...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: