mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
With the new opt-in floci.services.rds.endpoints-in-vpc, a standalone DB instance gets its own address in the subnet of its Availability Zone, as on RDS, and serves the Port it was created with, or its engine's default, under the name RDS gives it: <instance>.<identifier>.<region>.rds.<dnsSuffix>, with one identifier per account and Region. Floci's DNS server answers the name with the address, so two instances can both serve 5432. A relay container at the address forwards each connection to the instance's auth proxy, so IAM authentication, TLS and the master login are unchanged; IAM tokens bind to the name and port the proxy binding publishes. The address follows the instance through create, stop and start, a backend started on retry, a move to another DB subnet group, a blue/green switchover, delete, a failed create and a restart, and keeps its subnet and VPC in use for DeleteSubnet and DeleteVpc. VpcAddressRelays serves any endpoint this way next to VpcContainerLeases, which now takes back a preferred address; RdsDnsRecordSource answers the names, and AwsEndpoints builds them. Clusters and DB proxies keep the proxy endpoint for now. Refs #6273