Remix.run Logo
znnajdla 8 hours ago

I've designed our app so that there are only two stateful services that matter: Database and Disk. Everything else is cattle, you can shut down or spin up new instances and the load balancer redirects requests with no impact. Making Postgres redundant is a matter of careful configuration with PGBouncer + HAProxy + Patroni. However for a long time we had a much simpler setup: just restore a new database from backup on a new machine if the main one failed (one-time simple script run manually - not automatic, means a little bit of downtime if there's a failure, but it worked). Or you could use CockroachDB. Making disk redundant: just use MinIO for S3-like disk (that's also where DB backups are stored). You can lose up to 2 out 4 of your servers and you lose nothing.

With this setup if 1 or 2 Mac Studios fail (or need to be restarted for updates) everything just keeps running smoothly with no customer impact. It also helps that the app itself is on the Elixir BEAM (Phoenix) so everything "just works" across all machines.

zonkd1234 8 hours ago | parent [-]

cheers. Had never heard of MinIO either, very cool.

magicalhippo 7 hours ago | parent | next [-]

Do note MinIO is deprecated and no longer maintained, discussed here[1]. There are plenty of alternatives though, most mentioned in the referenced submission.

[1]: https://news.ycombinator.com/item?id=47000041

ffsm8 7 hours ago | parent | prev [-]

MinIO was a previously open source blob store. It's pretty old, it was basically created right around the time S3 took off.

You should probably reconsider going with it in 2026 unless you're fine with their new (non -opensource) offering. It still has a "free" license, so it might still be an option depending on your priorities.

But there are alternatives around, some being arguably much easier to run/maintain for small deployments like this.