Alejandro Duarte's Quick Cluster Packs Eight Raspberry Pis for 32 Cores and 64GB of RAM
Designed for database experimentation and managed through Ansible, this compact cluster stacks the Pis high.
Developer Alejandro Duarte has put together a low-power cluster for database experimentation, strapping eight Raspberry Pi 4 Model B single-board computers together for 32 processor cores and a whopping 64GB of RAM in total.
"Since I started to discover MariaDB and learned about database clusters, Distributed SQL, and Xpand, the idea of building a Raspberry Pi cluster has been in the back of my head," Duarte explains of the project's inspiration. "A cluster like this is a great way to experiment with distributed systems."
While Duarte points out that you can experiment with the same technologies on a single Raspberry Pi, his build uses eight Raspberry Pi 4 Model B 8GB single-board computers — the highest specification version available at the time of writing — connected to a ten-port 60W USB charger. With each Raspberry Pi having four processor cores, that's a total of 32 cores and 64GB of RAM — while a 256GB microSD card in each provides a total of 2TB of storage.
The cluster runs on Raspberry Pi OS Lite, installed for headless operation. The hardware is stacked eight-tall using stand-offs and acrylic sheets, with two fans included to help keep things cool. For post-installation configuration and cluster control, Duarte recommends Ansible — allowing for applications to be installed and executed across all nodes of the cluster.
"You now have a cluster of small computers ready to be controlled by Ansible. You can try setting up any kind of server software, including web servers or databases," Duarte writes. "There also is much more about Ansible. I merely scratched the surface here using ad-hoc commands, but you can for example create playbooks that contain the state in which you want your cluster to be."
Duarte's full guide is available on DZone.