I built a Raspberry Pi cluster. Four nodes, one cheap unmanaged switch, a perspex stack from eBay, and a USB charging hub that turned out to be the most important component by a distance. It did not teach me anything I could put on a CV. It was one of the more enjoyable weekends I've had in months.
Let me be honest about the premise up front, because the internet is full of breathless posts about how a pile of Pis is "your own private cloud". It isn't. Four Cortex-A53 cores at 1.4GHz and a gigabyte of RAM per node, talking over 100Mbit Ethernet (the Pi 3 B+ has gigabit-labelled hardware but it's behind USB 2.0, so don't get excited), is not a serious compute platform. It is a toy. The point of the toy is that you learn by wiring real things together and watching them misbehave in real ways.
the bill of materials, and the one that mattered
Here's roughly what went on the bench:
- 4x Raspberry Pi 3 Model B+
- 4x 32GB Samsung Evo microSD cards (the Evo+ ones, the cheap no-name cards corrupt under you)
- 1x TP-Link 5-port unmanaged gigabit switch
- 1x 60W 6-port USB power supply
- A handful of 30cm flat Ethernet cables and 30cm USB power leads
- A stackable acrylic case, four layers, with brass standoffs
The power supply is the bit nobody tells you about. A Pi 3 B+ wants 5V and will pull most of an amp under load, more if you hang USB devices off it. The official advice is 2.5A per Pi. People then buy a 6-port hub rated for "10A total" and wonder why nodes brown out the moment all four start a build at once. Undervoltage on a Pi doesn't crash cleanly. It throttles, corrupts the filesystem at the edges, and gives you flaky behaviour that looks exactly like a software bug. I spent a good hour blaming Docker before I noticed the little lightning bolt in the corner of a screen I'd plugged in to check.
The fix was boring and correct: a supply that can actually deliver its rated current per port, and short, thick USB leads. Long thin leads drop enough voltage to matter at these currents. This is the sort of thing you read as a warning and ignore, right up until it bites you.
what I actually ran on it
The plan was k3s. It wasn't out yet, so the plan became "Kubernetes the hard way on ARM", which lasted about as long as you'd expect on a Friday evening. I fell back to Docker Swarm, which in early 2019 is still perfectly reasonable and sets up in about four commands. docker swarm init on the first node, paste the join token on the other three, and you have a cluster.
# on node 1
docker swarm init --advertise-addr 192.168.10.11
# on nodes 2-4, with the token it prints
docker swarm join --token SWMTKN-1-xxxx 192.168.10.11:2377
# back on node 1
docker node ls
I deployed the only thing that makes sense on a cluster you built to look at: a load-balanced "which node am I" web service, and a Prometheus and Grafana stack so I could watch the temperatures climb. Watching four little line graphs creep up as a build kicked off, then settle, is genuinely satisfying. It is the model railway of computing.
The honest assessment: nothing I deployed needed four nodes. A single Pi would have run all of it with room to spare. The "distributed" part was theatre. But the theatre is the point. You get to see a container get rescheduled when you yank a power lead. You get to watch the overlay network actually route. These are things I'd read about for years and never physically pulled the plug on.
the things that genuinely surprised me
ARM image availability in early 2019 is much better than I expected, and much worse than you'd want. The official images are mostly fine. The moment you reach for something niche, you're either building multi-arch yourself or finding a three-month-old fork by someone in the same boat. docker buildx is starting to make this less painful but it's early days.
SD cards are the real enemy. Two of my four cards developed read errors within the first week of being hammered by container writes. If I were doing this for anything I cared about I'd boot from USB SSDs, or at minimum move the busy write paths off the card. For a weekend toy I just reflashed and shrugged.
Heat is real but manageable. Under sustained load the B+ throttles around 80C without a heatsink. Little stick-on aluminium heatsinks and the airflow from leaving the case open kept them in the 60s. I didn't bother with fans; the noise would have ruined the whole charm of the thing.
was it worth it
Yes, and not for any reason I can defend professionally. I learned that my mental model of "the cluster is the interesting bit" was wrong: the interesting bits were power delivery, cable quality, and SD card endurance, the unglamorous physical-layer stuff that production cloud quietly handles for you. There's something clarifying about a system small enough that you can hold every failure mode in your hands.
It now sits on a shelf running Pi-hole and a couple of cron jobs, which is to say it has found its true calling as a slightly over-engineered home server. The cluster software is gone. The case stayed, because it looks good with the blue Ethernet leads.
If you've been thinking about doing this: do it, but buy the good power supply first, and don't tell yourself it's for anything. It's for fun. That's allowed.