GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-proxy

Add support for seamless cut over to newly promoted read replica

Aperta
#1,831 8 commenti 0 reazioni 1 assegnatario Assegnata a @hessjcg Vedi su GitHub
priority: p2 type: feature request
Lingua principale
Go
Stelle
1.4k
Fork
352
Merge medio
14h 54m
PR unite (30g)
5

Descrizione

### 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](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances#sqlinstancetype)). 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 \
--replicas=,,
```

Note: there is a [work around](https://github.com/GoogleCloudPlatform/cloud-sql-proxy/tree/main/examples/disaster-recovery), but it requires manually wrapping the Proxy and adding a backing storage.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.