Best way to use managed databases services (RDS, CloudSQL, etc.)

I want to use a stable managed PostgreSQL service which provides auto backup and HA.

  1. Is it common to use a managed db service (RDS, CloudSQL) from a fly io app ?
  2. How about latency ?
  3. What is the recommended way to connect the Fly.io 6PN network to another cloud ? Or should we make the instance publicly accessible (this doesn’t sound like a good idea :slight_smile: )

This is reasonably common!

Latency will depend entirely on regions. In some cities we’re <1ms from AWS/GCP regions, in other’s it’s 20ms plus. We don’t have a good list of these so you’ll want to do some testing.

The best way to connect is to setup wireguard peers on the other end. We have a terraform example for doing this on AWS here: GitHub - fly-apps/rds-connector: Trivial Terraform example for a WireGuard peer to RDS

3 Likes