Live data from Hacker News

Migrating from DigitalOcean to Hetzner

isayeter.com

181–190 of 454 posts

Re: Migrating from DigitalOcean to Hetzner

#181
> Old server nginx converted to reverse proxy We wrote a Python script that parsed every server {} block across all 34 Nginx site configs, backed up the originals, and replaced them with proxy configurations pointing to the new server. This meant that during DNS propagation, any request still hitting the old IP was silently forwarded. No user would see a disruption.

What was the config on the receiving side to support this? Did you whitelist the old server IP to trust the forwarding headers? Otherwise you’d get the old server IP in your app logs. Not a huge deal for an hour but if something went wrong it can get confusing.

Re: Migrating from DigitalOcean to Hetzner

#182
does anyone else start to wonder about these companys issuing vps/online space with no hardening and no warning

you can basically go on hetzner and spin up a vps with linux that is exposed to the open internet with open ports and user security and within a few hours its been hacked, there is no like warning pop up that says "if you do this your server will be pwnd"

i especialy wonder with all the ai provisioned vps and postgres dbs what will happen here

Re: Migrating from DigitalOcean to Hetzner

#183

Every time I see this kind of article, no one really bothers about sb/server redundancy, load balancers, etc. are we ok with just 1 big server that may fail and bring several services down? You saved a lot of money but you'll spend a lot of time in maintenance and future headaches.

They may be making this decision based on a long history of, in fact, never really having run into "a lot of time in maintenance and future headaches".

To be fair, I migrated a VPS from Linode to Hetzner a few years ago. Minor downtime is a non-issue: personal website and email server. I approximately halved the monthly cost, and I haven't had any downtime except what I caused myself when rebooting to upgrade the kernel every now and then.

As a bonus, Hetzner is European.

Re: Migrating from DigitalOcean to Hetzner

#185
post #167

Earlier quoted context omitted.

It depends on the service and how critical that website is. Sometimes it's completely acceptable that a server will run for 10 years with say 1 week or 1 month of downtime spread over those 10 years, yes. That's the sort of uptime you can see with single servers that are rarely changed and over-provisioned as many on Hetzner are. Some examples: Small businesses where the website is not core to operations and is more…

What struck me though is that OP did so much work to migrare the server with zero downtime. The _single_ big server. Something’s off here.

There is software that can help a lot.

Also, in general, you can architect your application to be more friendly to migration. It used to be a normal thing to think about and plan for.

VMware has a conversion tool that converts bare metal into images.

One could image, then do regular snapshots, maybe centralize a database being accessed.

Sometimes it's possible to create a migration script that you run over and over to the new environment for each additional step.

Others can put a backup server in between to not put a load on the drive.

Digital Ocean makes it impossible to download your disk image backups which is a grave sin they can never be forgiven for. They used to have some amount of it.

Still, a few commands can back up the running server to an image, and stream it remotely to another server, which in turn can be updated to become bootable.

This is the tip of the iceberg in the number of tasks that can be done.

Someone with experience can even instruct LLMs to do it and build it, and someone skilled with LLMs could probably work to uncover the steps and strategies for their particular use case.

Re: Migrating from DigitalOcean to Hetzner

#186
post #167

Earlier quoted context omitted.

It depends on the service and how critical that website is. Sometimes it's completely acceptable that a server will run for 10 years with say 1 week or 1 month of downtime spread over those 10 years, yes. That's the sort of uptime you can see with single servers that are rarely changed and over-provisioned as many on Hetzner are. Some examples: Small businesses where the website is not core to operations and is more…

What struck me though is that OP did so much work to migrare the server with zero downtime. The _single_ big server. Something’s off here.

Well why have downtime if you can avoid it with a bit of work?

But I do agree the poster should think about this. I don't think it's 'off' or misleading, they just haven't encountered a hardware error before. If they had one on this single box with 30 databases and 34 Nginx sites it would probably be a bad time, and yes they should think about that a bit more perhaps.

They describe a db follower for cutover for example but could also have one for backups, plus rolling backups offsite somewhere (perhaps they do and it just didn't make it into this article). That would reduce risk a lot. Then of course they could put all the servers on several boxes behind a load-balancer.

But perhaps if the services aren't really critical it's not worth spending money on that, depends partly what these services/apps are.

Re: Migrating from DigitalOcean to Hetzner

#187

Every time I see this kind of article, no one really bothers about sb/server redundancy, load balancers, etc. are we ok with just 1 big server that may fail and bring several services down? You saved a lot of money but you'll spend a lot of time in maintenance and future headaches.

I agree with you, even for the servers I am responsible for I always make decisions like putting db on supabase instead of local, hosting files on s3 with versioning/multi region etc. then of course come up with a backup and snapshot system.

Re: Migrating from DigitalOcean to Hetzner

#188

Every time I see this kind of article, no one really bothers about sb/server redundancy, load balancers, etc. are we ok with just 1 big server that may fail and bring several services down? You saved a lot of money but you'll spend a lot of time in maintenance and future headaches.

If you can restore from snapshot to a new instance on cloud provider having running second copy is waste of money.

I know people like FAANG LARPing. Not everyone has budget or need to run four nines with 24/7 and FAANG level traffic.

Re: Migrating from DigitalOcean to Hetzner

#189
post #167

Earlier quoted context omitted.

It depends on the service and how critical that website is. Sometimes it's completely acceptable that a server will run for 10 years with say 1 week or 1 month of downtime spread over those 10 years, yes. That's the sort of uptime you can see with single servers that are rarely changed and over-provisioned as many on Hetzner are. Some examples: Small businesses where the website is not core to operations and is more…

What struck me though is that OP did so much work to migrare the server with zero downtime. The _single_ big server. Something’s off here.

to be fair a lot of ppl still run this way and just have really good backups, or have an offline / truly on-prep server where they can flip the dns switch in case of true outage.

Re: Migrating from DigitalOcean to Hetzner

#190
post #167

Earlier quoted context omitted.

It depends on the service and how critical that website is. Sometimes it's completely acceptable that a server will run for 10 years with say 1 week or 1 month of downtime spread over those 10 years, yes. That's the sort of uptime you can see with single servers that are rarely changed and over-provisioned as many on Hetzner are. Some examples: Small businesses where the website is not core to operations and is more…

What struck me though is that OP did so much work to migrare the server with zero downtime. The _single_ big server. Something’s off here.

Good point. I run single big servers. But I can bring them down every weekend for the entire weekend if I need to.
Post reply on HN