cloud-sql-proxy icon indicating copy to clipboard operation
cloud-sql-proxy copied to clipboard

Add support for seamless cut over to newly promoted read replica

Open enocom opened this issue 2 years ago • 8 comments

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.

enocom avatar Jun 02 '23 20:06 enocom

Related to https://github.com/GoogleCloudPlatform/cloud-sql-proxy/issues/1045.

enocom avatar Jun 02 '23 20:06 enocom

We would really appreciate this feature.

tomassommareqt avatar Nov 06 '23 09:11 tomassommareqt

+1 on this! Would be great to have this one working

sinclabs avatar Nov 06 '23 09:11 sinclabs

This would be really nice! 👍

jompa avatar Nov 06 '23 09:11 jompa

+1 on this!

davidforslof avatar Nov 06 '23 09:11 davidforslof

+1 👍

kristian-petersen avatar Nov 06 '23 10:11 kristian-petersen

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.

enocom avatar Nov 06 '23 16:11 enocom