Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Accessing Cloud SQL from my local is super slow

It might be mentioned in this post already but I just wanted to ask specifically here.

Accessing Cloud SQL from pod in GKE is blazing fast but from my local machine, it's 20x slower than what I seen in the remote pod. I tried out Cloud SQL Auth Proxy, but it didn't help.
It's quite eating dev productivity on local. Are there any updates on it? 

0 1 146
1 REPLY 1

Hi @humbroll,

Welcome to Google Cloud Community!

Accessing Cloud SQL from a pod in GKE is super fast, but it’s a real drag that your local connection is lagging 20x slower. That can definitely put a dent in productivity. You mentioned trying the Cloud SQL Auth Proxy, which is usually a solid choice for secure connections. If you are experiencing slow performance with the Cloud SQL Auth Proxy, there are a few things you can try:

  • Check the Proxy Logs: You can examine the logs under the Operations > Logging > Log Explorer page in Google Cloud console. Sometimes, the logs can reveal what's slowing things down. They might help you pinpoint any issues.
  • Run as a Persistent Service: Make sure the Cloud SQL Auth Proxy is set up to run continuously. If it stops for any reason, you could lose connections, which can slow things down.
  • Include in Auto-Scaling: If you're using auto-scaling, ensure the proxy is part of your VM setup. This way, new instances automatically have their own Cloud SQL Auth Proxy running.
  • Reduce Log Size: If the logs are too verbose, you can start the proxy with the --quiet flag to reduce output, but keep in mind that this might limit your troubleshooting ability

As for updates, definitely check your local network settings, as they can affect speed. Also, ensure your Cloud SQL instance is optimized for what you need. Google frequently rolls out updates, so keeping an eye on the Google Cloud blog for any improvements is a good move. If the issues persist, reaching out to Google Cloud support might give you more personalized help.

I hope the above information is helpful.