
Can An 8-Node Raspberry Pi Cluster Web Server Survive Hackaday? - gedrap
http://hackaday.com/2013/11/05/can-an-8-node-raspberry-pi-cluster-web-server-survive-hackaday/
======
alixaxel
I don't get it...

What's the surprise in having a cluster of 8 Pi serve 45k hits a month? That's
25 hits per hour, a single Pi would do it. Plus, Apache..?

~~~
ztnewman
What's wrong with Apache for this?

~~~
alixaxel
My main concern in a setup like this would be memory consumption.

But it also just doesn't perform as well vs nginx, Lighty, Cherokee and
others.

------
pilom
The actual cluster is hosting the site at:
[http://raspberrywebserver.com/](http://raspberrywebserver.com/)

------
VLM
"takes up much less space."

In the 90s I experimented with clusters using stacks of desktops and
occasionally blew circuit breakers, and in the 00s I had a much smaller (but
still pretty big) stack of 1U rackmount servers in the basement. I like the
idea of a stack of 8 servers to experiment with fitting in a small desk drawer
or shoebox. Also the sonic impact of my experimental toy clusters has
decreased dramatically as size has shrunk.

The most useful thing I ever did with my toy home clusters was when .mp3
started getting big but a typical desktop took 20 minutes to encode just one
song, I ripped my whole CD collection quickly using my cluster. It would have
been just as fast to split by CD with 10 CDs on 10 machines, but it was a much
more cluster-y learning experience to rip a single CD in parallel. From memory
it took a typical drive about as long to read a cdrom to wav files as it took
any other machine to convert one song from wav to mp3 so I set up a pipeline
with unfortunately pretty high latency. The point of this industrial
archeology anecdote is it would be interesting to find a "real world" app like
this for a rasp-pi cluster. I suppose the tried and true povray raytracing or
mandelbrot rendering is still cool, it would be interesting to learn of new
toy cluster apps.

A couple times over the past decades I've applied my home toy cluster
experience to real work jobs. Its all the same software after all, although
the "real" stuff at work ran an order or two magnitude faster than what I had
at home.

------
drv
This is a pretty neat hack and I can certainly see the fun in setting up
something like this.

However, I am amused that the load balancer is a fairly powerful PC[1] that
could probably serve the web site just as effectively as the whole cluster of
8 RPis and then some. On the other hand, the PC probably uses a lot more
power...

1:
[http://raspberrywebserver.com/raspberrypicluster/raspberry-p...](http://raspberrywebserver.com/raspberrypicluster/raspberry-
pi-cluster.html)

------
csmuk
If it's static content and not chock full of JavaScript and other stuff it
should be fine.

I managed to shift serious amounts of pages out of a 75MHz SPARC 20 back in
the day.

~~~
tiernano
even if there is a load of JavaScript, it should still be grand... the JS is
run on the client, not the server...

~~~
diminoten
Maybe he means ajax?

~~~
csmuk
No I mean both. You don't _need_ JavaScript for a blog unless you've loaded it
with crapware and tracking stuff. Just lose the extra requests/code.

------
zdw
The Pi's biggest strength is it's GPU. Using some of the OpenMAX API's for
video or 3D encoding would probably be a better use than a CPU-bound task like
web serving:

[http://elinux.org/Raspberry_Pi_VideoCore_APIs](http://elinux.org/Raspberry_Pi_VideoCore_APIs)

------
trebor
I'm interested in the performance characteristics of weak-node clusters versus
strong-node clusters. I wonder what he'll say when HN hits his site?

------
luis8
Nice i'll attempt something similar in a month to play/learn with clusters on
linux. Btw is the server handling php or any other language. Are you hosting
this like in your house? how much bandwith do you have?

~~~
alixaxel
The website lists guides on how to do a setup like this in Apache +
Perl/Python + SQLite/MySQL.

------
jaxbot
Better yet, can it survive an HN load that seems to take down typical blogs?
I'm genuinely curious to see what happens throughout the day.

------
Doublon
So far so good. The pages load quickly.

