Connecting Cloud SQL from Multiple GKE Replica Pods

38 views
Skip to first unread message

Aniket Bhadane

unread,
Jul 23, 2019, 4:38:24 AM7/23/19
to Google Cloud SQL discuss
We have a Spring 4 application running of GKE and JPA for ORM. Our minimum Replica set is 4. We want to connect to Cloud SQL from these replica pods.
1. If we go by the Cloud SQL Proxy approach, the cloud sql proxy would be a sidecar container in each of the pods. Are there any resource consumption and and performance results for the cloud sql proxy? How much resources does a cloud sql proxy consume for a given rate of requests. We would obviously do this test, but are there any results from Google?
2. What is better way of communicating with Cloud SQL when there are multiple gke replica pods connecting to the cloud sql db? Cloud SQL Proxy or Private IP? 

Julie (cloud platform support)

unread,
Jul 23, 2019, 11:03:48 AM7/23/19
to google-cloud...@googlegroups.com
Its difficult to determine the expected performance of the Cloud SQL proxy as it may be different for different use cases. If it seems your proxy is behaving inappropriately, opening an issue tracker will allow us to take a look at it. I have not found any specifics on Cloud SQL proxy expected performance however it helps to configure Cloud SQL and GKE around the same location. 

Private IP is the easiest way to connect from Google Kubernetes Engine if your cluster meets the requirements. If you are planning on using Public IP, the Cloud SQL proxy is needed to secure the connection. Full details on how to connect via Cloud SQL proxy and private IP is detailed here.
Reply all
Reply to author
Forward
0 new messages