logoalt Hacker News

Doohickey-dyesterday at 2:02 PM5 repliesview on HN

What are you doing for DB backups? Do you have a replica/standby? Or is it just hourly or something like that?

Because with a single-server setup like this, I'd imagine that hardware (e.g. SSD) failure brings down your app, and in the case of SSD failure, you then have hours or days downtime while you set everything up again.


Replies

kroyesterday at 2:15 PM

Hetzner normally advertises their hardware servers as 2x 1 TB SSD, because it's strongly recommended to run them in SWraid1 for net 1TB. (Their image installer will default to that)

Once the first SSD fails after some years, and your monitoring catches that, you can either migrate to a new box, find another intermediate solution/replica, or let them hotswap it while the other drive takes on.

Of course though, going to physical servers loses redundency of the cloud, but that's something you need to price in when looking at the savings and deciding your risk model.

And yes, running this without also at least daily snapshotting/backup to remote storage is insane - that applies to cloud aswell, albeit easier to setup there.

show 1 reply
hnthrow0287345yesterday at 2:23 PM

It's possible no one will care much if it's down even for that long. I couldn't care less if my HOA mobile app was down even for a week for example. We don't need constant uptime for everything.

show 2 replies
traceroute66yesterday at 2:16 PM

> Because with a single-server setup like this, I'd imagine that hardware ...

Yeah. This blog post reads like it was written by someone who didn't think things through and just focused on hyper-agressive cost-cutting.

I bet their DigitalOcean vm did live migrations and supported snapshots.

You can get that at Hetzner but only in their cloud product.

You absolutely will not get that in Hetzner bare-metal. If your HD or other component dies, it dies. Hetzner will replace the HD, but its up to you to restore from scratch. Hetzner are very clear about this in multiple places.

show 3 replies
faangguyindiayesterday at 3:14 PM

The easiest I’ve done is in MongoDB replication, sharding, failover, and all that is super easy.

Recently, I did it in PostgreSQL using pg_auto_failover. I have 1 monitor node, 1 primary, and 1 replica.

Surprisingly, once you get the hang of PostgreSQL configuration and its gotchas, it’s also very easy to replicate.

I’m guessing MySQL is even easier than PostgreSQL for this.

I also achieved zero downtime migration.

show 1 reply
kijinyesterday at 2:45 PM

If that's the tradeoff they're willing to make, who are you to say that they're doing it wrong?

Not every app needs 24/7 availability. The vast majority of websites out there will not suffer any serious consequences from a few hours of downtime (scheduled or otherwise) every now and then. If the cost savings outweigh the risk, it can be a perfectly reasonable business decision.

A more interesting question would be what kind of backup and recovery strategy they have, and which aspects of it (if any) they had to change when they moved to Hetzner.