Add support for seamless cut over to newly promoted read replica
Feature Description
After promoting a read replica, the Proxy must be restarted with the new primary's instance connection name. Instead, it would be better if the Proxy could automatically connect to the newly promoted primary.
Currently, the Admin API will report if an instance is a primary or not (see here). Perhaps we could add support for specifying all read replicas and letting the Proxy "discover" the new primary (although this might cause a jump in Admin API quota usage).
For example,
./cloud-sql-proxy <INSTANCE_CONNECTION_NAME> \
--replicas=<REPLICA_INSTANCE_CONNECTION_NAME_1>,<NAME_2>,<NAME_3>
Note: there is a work around, but it requires manually wrapping the Proxy and adding a backing storage.
Related to https://github.com/GoogleCloudPlatform/cloud-sql-proxy/issues/1045.
We would really appreciate this feature.
+1 on this! Would be great to have this one working
This would be really nice! 👍
+1 on this!
+1 👍
It's in the works. There are some backend changes that will have to happen first, so the timeline isn't clear (especially with EOY freezes coming up), but we're actively working on this.