I am hosting a ecommerce application here on google cloud. All is well to an extent with my current situation.
I have a single application load balanced with two stores. I have three instance groups:
- Store 1
- Store 2
- Admin(for running cron jobs and consumers)
My primary region is us-central1. My CloudSQL(MySQL 8.0) is in the same region.
I also have a managed Redis setup who is in the same region.
Each instance group has one instance in the same regions.
Whenever I create an instance group in say, us-west1 and add that backend to my load balancer. Traffic is extremely slow for connections that hit that server.
My assumption was a highly available load balancer would properly route traffic to the closest resources for optimal performance. I guess I’m missing something here.
I noticed when I created a CloudSQL private IP, it created a VPC peer group(servicenetworking-googleapis-com). It only included two inbound routes for us-central1, not for us-west1 as well. See screenshot: https://i.imgur.com/QGJM5tk.png
My question is, what do I need to do to make it so my application in regions outside my primary region aren’t super slow. Currently, my uptime monitor says its 2s to get a response from my west server, as opposed to 185ms for my central server.
Best answer by hi5guyView original