Migrating prod to fly - Dealbreaker Postgres?

Hey all! We are currently moving away from AWS EKS to fly. Our reason for moving was a more simplified setup that every developer in our team can own. (without knowledge about yaml, external dns or magic cert manager setups)

So far our journey has been great, our staging setup is now fully running on fly and its great. We love it. I am currently evaluating a migration path for our production system. Right now its a node app running in EKS, connecting to a private VPC postgres (RDS) that only the cluster can access. We have high compliance requirements as we are building a SaaS for US healthcare.

Now the question. How would one migrate this setup to fly.io? We initially looked into crunchybase managed postgres as suggested in the docs here: This Is Not Managed Postgres · Fly Docs

After some fiddling around this does not seem to be a valid alternative though. Securely connecting from fly to crunchy seems to only work with a static ip which doesn’t seem to be possible right now. Obviously we are not going to open up our production postgres to the whole world, so every service outside of fly is pretty much out of the game.

I initally disliked the idea of owning the postgres ourselves, but we decided to give the whole fly postgres (v2) setup a whirl. A manual setup (via cli on some devs machine) worked and i believe we would be comfortable with owning more infra tasks (as fly postgres is not managed)

One thing i would really really like though is that this is not some manual “once run” cli setup. I want all of this config to be in code, reviewable and ownable by a team of developers. So a setup with terraform is required here. I tried my luck with the fly terraform provider and setting up a postgres-ha with this but wasn’t able to get it to work consistently.

With the current offerings of fly, i feel like we are stuck in a weird spot where fly is great and we would love to use it, but the postgres topic seems to be a big blocker for teams running in production. Does anyone have recommendations here on what to-do?

Not to try to put you off of Fly Postgres, but I’m curious about whether you considered the Crunchy Bridge / Tailscale integration as an option for connecting from your Fly apps. Postgres + Tailscale – A database you can trust with a simple VPN

1 Like

This would require me running a Tailscale Gateway/Node inside my fly namespace right? Haven’t seen this yet this looks like what we need TBH.

Nvm. Just found their example app on fly here → webstack/fly-go-crunchy-replicas at main · croaky/webstack · GitHub looks like its just a Tailscale client inside the app.

Thanks that looks great!

1 Like

Just for anyone else who comes across this thread. Here’s a site comparing latencies for different stacks and providers. Fly to crunchy via tailscale is the snappiest and most stable solution out there right now: https://webstack.dancroak.com/