And even if you want to experiment with multi-node HA stuff, I personally prefer to do that with VMs than wrangling actual physical machines
I connect my Pis to my WiFi router and I've struggled with the adapters, so a POE switch might be interesting. I should containerize stuff, but I enjoy running it directly as well. I need to figure out backups some day.
The biggest issue I've had is that I've lost 3 SD cards in 6 years. Twice due to power failure, and once to heavy disk writes. I can't stand randomly losing stuff and having to re-setup a pi, so I switched to booting from USB SSDs. I haven't had an issue since. The cost is a bit obnoxious since I don't trust a cheap drives, but the perceived peace of mind is nice.
Has anyone else had this issues with losing SD cards while self hosting on Pis?
100% to backups. I know we all put off doing it, but you'll rest a lot easier, even with personal data you don't think you care about. It's not only about a hardware failure, but even a fluke sysadmin error where you accidentally nuke something. I'd recommend getting a account for Backblaze B2, and setting up restic on each Pi to at least daily backup the data directories and stuff you care about. For your Gitlab it's a bit less risky since presumably you also have a clone of each repo on some other machine.
I love that people are building small datacenters out of Pis. I haven't done the math as far as TCO, but instead of multiple Pis for self-hosting, I have a lonely secondhand Dell Precision with an old 8th gen Intel CPU (6C/12T), 64GB of RAM, and several TB of NVMe plus some spinning rust for the long term stuff. It's just a crazy amount of horsepower. Most trusted workloads run as containers, and my other experiments can run as VMs, and I have capacity in all the right places (I need disk and RAM more than CPU). Not as exciting as building a cluster, but I have the excess capacity to spin up multiple VMs on that one machine, if I want to play with that. It can get very Inception-like, what if I'm running VMs in KubeVirt on top of Kubernetes that is running on a cluster of VMs that are ultimately on a single machine, but while delegating whatever extra /64 IPv6 prefixes Comcast gave me to each of the bottom-layer VMs so that each pod still gets a globally routable IPv6 address. Cool times for the homelab stuff, and helped me understand things like Kubernetes and IPv6 to a much greater depth.
I've never had any problem as long as I've stuck with the `sudo shutdown` command, which powers down in a controlled manner so writes don't get interrupted. But I've also never had an issue after a power outage, so I think somehow power outage shutdowns are more graceful than just yanking the power cable out.
If you're really concerned, you can always configure your Pi to use a read-only root filesystem. Combine that with a USB SSD to store your _actual_ data and you should be OK indefinitely. Or just boot from that USB SSD -- just remember to configure fstab correctly for your intended behaviour! You might be surprised to discover that fstab can delay a boot indefinitely if mounting expectations do not match reality.
To be fair, these SD cards were exposed to fairly extreme Texas temperatures. One in a car dashcam, the other in an outdoor camera.
Assuming it's 20W in total, that's 14.5 kWh/month, which even as US prices of $0.15/kWh adds up to $2.15 per month. In Europe you're closer to €5/month (€0.35/kWh)
For the peace of mind, I'd even pay more -- but it's significantly cheaper in the long run to self host since those 'cheap shared-resource' virtual servers are always oversold.
But to each his own.
Or you encrypt your data as well as backup your data somewhere else.
Besides, on the scale we're talking here, a workload that can be handled by 3 RPI's (or a VPS), do you really have such sentivie data ?
Fwiw Cloudflare Proxy and, to a lesser extent Tunnels, are de facto MITM attacks. I don't exactly trust large unprofitable corporations to do the right thing when they decrypt all of my and my users' traffic.
Not that CF is a malicious entity, but, the potential for them to be used as one is a looming threat. Then again, so is any VPS you host on :^)
Neat to see Docker Swarm in use. Don’t hear much about it since K8s took over.