Creating a 4-Node Cluster
I had some parts that I could re-use, like some old Raspberry Pis lying around. However, if I were to set up a cluster from scratch, here is what I would buy:
- Raspberry Pi 4b - 2GB ($35 x 4 = $140). I actually used a combination of 8GB models, a 4GB model, and a Raspberry Pi 3 B+. If I were to start over I would not have gotten the more expensive 8GB model ($75) since I can get 2 of the 2GB models for the same price. Most of the processing is dependant on the CPU, and all the models have the same quad-core processor.
- Cluster Case ($19). There are so many variations of this same style case. I picked this one because it came with fans and heat sinks, which are both cheap but would be one less thing to buy
- SD Card ($7.50 x 4 = $30). I’ve had good luck with these Samsung cards. You probably only need 16GB, but I would get whatever is cheapest.
- USB Charger ($30). Instead of 4 power supplies, I got one USB charger. For Raspberry Pi 4 you need to make sure it handles the power you need since they take more than Rapsberry Pi 3. This one seems to be working
- Dedicated network switch ($35). I like having this just so everything is contained. If you have a network switch or room to plug in 4 ethernet cords, use that.
- USB-C cables and Ethernet cables ($10). I had plenty of these. But the USB-C cables are for powering the Rapsberry Pis.
Total: $234
Adding More Nodes
Basically, you just need to duplicate this setup for however many Raspberry Pis you want. For every 4 you’ll need to spend about another $230. If you are going to be expanding, you could probably save a little bit of money by combining things like the network switch or power.