Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DNS configuration and automatic failover. #421

Open
hessjcg opened this issue Feb 25, 2025 · 0 comments · May be fixed by #427
Open

Support DNS configuration and automatic failover. #421

hessjcg opened this issue Feb 25, 2025 · 0 comments · May be fixed by #427
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@hessjcg
Copy link
Collaborator

hessjcg commented Feb 25, 2025

The connector may be configured to connect to a Cloud SQL instance using a DNS name.

When a connection is configured with a DNS name (instead of an instance name), the connector will query the local DNS for a TXT record. The TXT should contain an instance name matching that DNS name. The connector will use the instance name from the TXT record to connect to the Cloud SQL instance.

The connector will periodically query that DNS. If the instance name in the DNS record changes, the connector will terminate all open connections to the old instance. Then, it will reconfigure itself to open connections to the new instance.

Users can configure their database clients using the domain name instead of the instance name.
Users can fail-over database clients when they change the DNS entry for the database instance.

This feature is implemented in all of the connectors:

@hessjcg hessjcg added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Feb 25, 2025
hessjcg added a commit that referenced this issue Mar 11, 2025
. (#424)

Add CloudSqlInstance.close() to stop the refresh cycle permanently.

Change CloudSqlInstance.forceRefresh() so that it schedules a refresh and returns immediately.
This should not return a promise. Update test cases to account for changes.

Part of #421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
2 participants