GoogleCloudPlatform / cloud-sql-jdbc-socket-factory

A collection of Java libraries for connecting securely to Cloud SQL
Apache License 2.0
234 stars 119 forks source link

feat: Automatically configure connections using DNS. Part of #2043. #2044

Closed hessjcg closed 4 months ago

hessjcg commented 4 months ago

A connection may be configured to using a DNS name instead of an instance name. If the cloudSqlInstance property is set to be a domain name instead of an instance name, the connector will look up a SRV record for that name and connect to that instance.

There should be exactly 1 SRV for the database instance. The connector will always use the SRV record with the highest priority.

Part of #2043