Ask HN: Raspberry Pi Server Farm with Load Balancing
I am a Web developer with only rudimentary knowledge of how a server farm is physically designed and maintained. Nevertheless I would like to build a tiny rack filled with about a dozen Raspberry Pi computers (when suppliers allow buying that many at once.) I would like to use each as its own modest server instance, akin to Webfaction, and use another to manage the load balancing across them.
I know this has been considered before, but I would like to ask HN about advice and resources. I have never had to run an application distributed on more than one server so any materials on horizontal scaling, building and managing a small farm would be appreciated. Also, it will need to account for more storage than just a small SD card in each RPi. What's the best way to mount a harddrive RAID into this setup for shared storage?
4 comments
[ 4.4 ms ] story [ 13.8 ms ] threadBut, given you can run your stack on a single RasPi. Use one to run HaProxy in front of it.
It has a ton of information about building a load balanced infrastructure using HAProxy.
This article helped me too: http://horms.net/projects/has/html/node6.html
Read some architecture articles from this site: http://highscalability.com
I am also planning on doing that, so once suppliers allow multiple machines I'll write a blog post about I had to do.
Assuming you do want to do this, consider getting one more capable box, and using it as a firewall, load balancer, NFS server and database server. Your Pis can then talk to this machine and do the webby things. (If you want to avoid a single point of failure, use CARP/VRRP, some sensible load balancer, DRBD and database replication. Reboot all Pis on failover, failing over NFS mounts is very painful.)