I'm happily using GKE in GCP. My database (Timescale Cloud) is in AWS. I measured latency from GCP us-central1 to AWS us-central-1 at ~20ms (via pgbench running SELECT 1, I'm not claiming you'll get the same results with a ping). An EC2 instance in us-central-1 gets <1ms latency. I'm considering switching my compute over to AWS just because of this but before I do that I wanted to check, is there anything that I can do to mitigate this?
Hi,
Welcome to the Google Cloud Community,
That's quite normal, when you've using multicloud approach. I'm guessing that your connection between AWS and GC is over HA VPN or public IPs. If the second option is being used, try to connect via VPN. Perhaps, latency will be lower. If you are using VPN already, Cross-Cloud Interconnect option is nocking to my mind. Check this [1]documentation to get more info. AFAIK, this option might be quite expensive. I would suggest to either migrate DB to GC or GKE cluster to AWS (depends, what will be faster and easier to migrate ) rather than setting up Interconnect setup.
[1]. https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cci/aws/connectivity-overview
cheers,
DamianS