A Large Cluster of Small Computers
Christian Haschek built a self-managing Raspberry Pi NanoCluster the size of a coffee mug that supports up to 28 cores and 112 GB of RAM.
What’s better than pie? More pie. This same basic, indisputable truth also holds true when it comes to Raspberry Pi. One Pi is great, but the more, the merrier. And since these little single-board computers are easy on the wallet (although, not as much so as they used to be), getting a big stack of them together is a practical thing for even weekend hobbyists to do.
Christian Haschek couldn’t resist the allure of large numbers of Raspberry Pi computers, so he decided to build a miniature cluster out of them. And this isn’t just for the heck of it — a cluster like this is the perfect addition to a homelab setup for experimentation or working on wild projects. Things that could tie up (or potentially hose) your desktop rig can be shifted over to the cluster to make your life easier.
Haschek’s build centers around the NanoCluster, a high-density board capable of housing up to seven Raspberry Pi Compute Modules. In a fully populated configuration, that translates to 28 CPU cores and up to 112 GB of RAM, all packed into a footprint roughly the size of a coffee mug. For his build, Haschek used a mix of Raspberry Pi Compute Module 4 and 5 boards, each assigned a specific role in the cluster.
The controller node, a CM4 module with 2 GB of RAM and a 256 GB NVMe SSD, manages the show. Four additional Compute Modules handle the heavy lifting, each with 8 GB of RAM and a 64 GB SD card for local Docker workloads. Haschek opted for SD cards over network storage to keep the 1 GbE shared connection free for inter-node communication.
The whole cluster runs Alpine Linux, chosen for its speed and efficiency. The controller handles several services: a TFTP server to PXE-boot new nodes, an NFS server for shared storage, and a Caddy web server that delivers setup scripts and configuration files. New compute nodes can be added easily — simply plug in a fresh Pi, let it boot from the network, and it automatically joins the Docker Swarm cluster without any manual setup.
All of this is managed using a GitOps approach. Whenever Haschek updates the repository of Docker stack configurations, the controller automatically pulls changes and redeploys them. That means apps can be updated or removed entirely just by modifying files in a Git repo.
The final result is a self-managing, energy-efficient, and scalable Raspberry Pi cluster — one that runs Haschek’s own blog and delivers zero-downtime deployments, proving that when it comes to Pi, there really is no such thing as too much.