Using automatic PSC endpoint creation with Auth Proxy, backup recovery considerations
I maintainer di solito rispondono entro 1 giorno
@hessjcg ci sta già lavorando.
Dal 31/3/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Question
Hi,
I am trying to use the CloudSQL Auth Proxy to connect to an existing private database instance that is in a different project to my consumer VPC. It is not possible to use Private Service Access (PSA) in this case (for the reasons described by @jackwotherspoon here) and I must use Private Service Connect (PSC).
Background
I have successfully used Private Service Connect (PSC) in my dev environment using the new "Create the endpoint automatically" approach, however I have some concerns about the implications this has on database backup restore operations. I'd like your advice on how to architect this.
My knowledge of CloudSQL backup restores is that it is bad practice to restore to the same instance you're running in production. The console warns not to do this in production:
Based on this, my database disaster recovery playbooks involve creating a new database instance. However, when using PSC to connect to the database, this introduces operational complexities which are not fully alleviated by using the new "Create the endpoint automatically" approach.
PSA-only DB restores
If I were connecting to the database only via PSA, backup restores are trivial. I simply create a new instance, restore the backup, and change my CloudSQL Auth Proxy config to point to the new instance connection name.
PSC DB restores
It is not as simple as above when using PSC. I think it's best to explain with some architecture diagrams.
To start, here's how my architecture looks when using PSC with CloudSQL Auth Proxy:
Suppose I need to do a database backup restore due to some data corruption in production. The way I would do this is by creating a new database instance and restoring the backup. The PSC Endpoint will be automatically created in my consumer project, as per my service connection policy.
To complete the database backup restore, I need to:
- Create a new DNS A record from "recommended instance PSC DNS name" to the auto-created PSC endpoint's IP Address
- Switch the CloudSQL Auth Proxy instance connection name to new DB and deploy
This looks like this:
Problem
The main problem is that this turns a database restore into a much more operationally complex procedure. Imagine being the on-call engineer that needs to do all of this at 2am, imagine if you didn't know anything about Private Service Connect. Additionally, this makes the potential downtime in this disaster much longer than necessary, which increases the likelihood we will miss our SLAs.
Really, what we need is a way to automate this DNS record creation following the automatic PSC creation. If this were the case, switching to the new instance would be as simple as before, as it just requires changing the instance connection name on the CloudSQL Auth Proxy.
Please can you check the following:
- Is there an alternative architecture where I do not have these challenges?
- Is there a way to automatically provision the DNS records too?
- Are there any planned features or feature requests to allow this?
This functionality means a lot to my company, and will give us tremendous value, but I am struggling with the practicalities right now.
Thank you in advance!
- Lingua principale
- Go
- Stelle
- 1.4k
- Fork
- 356
- Merge medio
- 14h 48m
- PR unite (30g)
- 8
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GoogleCloudPlatform/cloud-sql-proxy
-
Regression: --quiet disables --structured-logs againForse già presa @Firehed l’ha presa 4 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
GoogleCloudPlatform/cloud-sql-proxy#2693 ·
I maintainer di solito rispondono entro 1 giorno
-
flakybot: flaky flakybot: issue priority: p2 type: bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
GoogleCloudPlatform/cloud-sql-proxy#2680 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
flakybot: flaky flakybot: issue priority: p2 type: bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
GoogleCloudPlatform/cloud-sql-proxy#2672 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
flakybot: flaky flakybot: issue priority: p2 type: bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
GoogleCloudPlatform/cloud-sql-proxy#2671 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
flakybot: flaky flakybot: issue priority: p2 type: bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
GoogleCloudPlatform/cloud-sql-proxy#2670 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di GoogleCloudPlatform/cloud-sql-proxy
Issue simili
-
product/backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TencentBlueKing/bk-nodemgr#3645 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(prompt): filer socket fragment hardcodes an issue-intent cap of 8 that Chore runs overrideApertaagent-butler-finding chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jordansmall/spindrift#5128 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
License GOtome under Apache 2.0 instead of AGPL-3.0Forse già presa @praetorianer777 l’ha presa oggi. Apertaarea:workflow documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
praetorianer777/GoTome#212 ·
I maintainer di solito rispondono entro 1 giorno
-
ci: pin Go version in Build and Unit Test workflows (>=1.26.6 floats to 1.27.2 and breaks golangci-lint)Forse già presa @leninmehedy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
hashgraph/solo-weaver#1255 ·
I maintainer di solito rispondono entro 1 giorno