
My Raspberry Pi WordPress server survived the front page of Hacker News - jstalin
http://pipress.vo3.net/?p=16
======
diego
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.

~~~
velodrome
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.

~~~
stevewilhelm
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.

------
Kluny
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.

~~~
thenomad
...and it was still worthwhile.

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

------
Nikkau
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.

~~~
InclinedPlane
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.

~~~
hosay123
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)

~~~
Firehed
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.

------
jnazario
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.

------
nu2ycombinator
Hahaha. It is not accessible now

------
akavlie
Is this running from home?

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

~~~
colonelxc
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.

~~~
jff
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.

------
jkaljundi
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?

------
film42
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.

~~~
gscott
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.

------
WestN
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.

------
alt_f4
Ironically, it is down now.

~~~
ponyous
It was also yesterday.

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

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

------
programmer_babu
Not the second time, no.

------
sliverstorm
This sounds like a challenge, boys.

------
yozmsn
Not working right now...

