biotorrents / gazelle

BioTorrents.de’s version of Gazelle
https://torrents.bio
ISC License
19 stars 3 forks source link

Migrate to arm64 instances #68

Closed pjc09h closed 1 year ago

pjc09h commented 1 year ago

Hetzner offers arm64 VPS instances that are basically double the specs of amd64 for the same price. Where possible, I'd like to upgrade the servers. So far, the only dependency that needs amd64 is Ocelot, as it must be built from source.

pjc09h commented 1 year ago

The good news is, this can be done gradually because only the Falkenstein location supports arm64 and it's part of the same eu-central network zone as Helsinki, so the existing LAN can work with both locations. As part of this migration, I want to make sure each instance is a full Redis and WireGuard peer in addition to whatever else it's doing.

The first thing is to set up a new master database server. Then, the host running Manticore is an obvious next target because it currently does nothing else. That may be a good database slave. Out of the original three servers, at least two of them aren't expendable right now.

It's also a great opportunity to take a hard look at various root scripts, firewall stuff, server configurations, etc., and update things as needed.

pjc09h commented 1 year ago

Cool, almost everything is brand new and the old database server is gone. We're set up to query the replica for reads, everything is nice and tight, dual IPv4 and IPv6 natively supported throughout, everything that happens on the LAN happens over WireGuard. The web servers need to be amd64 due to the blake3 dependency but that's fine.

The last thing in this this space is to replace the two remaining legacy servers with one for Docker containers and another for miscellaneous daemons like IRC, email, etc. That should give two web servers, two database servers, two trackers, two app servers, and like six cache servers. That really depends on the Ocelot dependency being gone, because I don't want to shit up my fancy new web servers with crazy build tools.

This is all about positioning the site for scale so there's nothing to worry about down the line or probably ever if we're being honest. There's already Redis cluster support and database replication already exists, but the Gazelle codebase doesn't support replica reads yet.

pjc09h commented 1 year ago

This has been done for a couple weeks.