Connecting Cloud Run to Cloud SQL Securely with the Auth Proxy and IAM Authentication
Learn how to run Cloud SQL Auth proxy as a sidecar in Cloud Run, use IAM database users, and verify the connection without storing passwords.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to run Cloud SQL Auth proxy as a sidecar in Cloud Run, use IAM database users, and verify the connection without storing passwords.
Eliminate SSL certificates and IP whitelists for Cloud SQL by using the Auth Proxy on Compute Engine. A step‑by‑step guide shows how to set up a service account, install the proxy, and connect PostgreSQL locally. Learn the trade‑offs, verify the connection, and secure your database access with IAM.
When Cloud SQL instances experience sudden spikes in connection count, the culprit is often the Auth Proxy’s connection‑pool behavior. Version 2.0.0 introduces a --max_connections flag that caps concurrent connections, but omitting it lets the proxy open a new connection per request. Coupled with a hard‑coded 60‑second idle timeout, this can leave orphaned s
Goal The goal is to quantify the potential connection bottleneck when a Cloud Run service talks to Cloud SQL through the Cloud SQL Auth proxy. Each incoming request typically opens a new TCP connection to the database, and Cloud Run’s default maximum concurrency is 80. If each request opens a distinct connection, the Cloud SQL instance may quickly hit its pe
Interoperability Boundary A Cloud Run service uses an application-level connection pool (for example, HikariCP with maxPoolSize=20 ) while the Cloud SQL Auth Proxy sidecar runs with --max_connections=10 . Both components enforce a connection ceiling, but the documented interaction between the two limits is not explicit about which one effectively governs bac