2
votes

We are using cross region load balancing. When we get heavy traffic all at once, within 1 region, it begins to spin up new instances. While it is starting new instances, we get random HTTP 502 errors. Screenshots of configurations below. Is there any way to avoid the 502 errors while it is scaling up?

Image links of configuration below.

Instance Group Configuration (same setting on all regions)

Load Balancer

Thanks in advance for the help!

1

1 Answers

0
votes

HTTP load balancer and the instances will have different external IPs.

1) Try accessing through one instance's external IP first to make sure the backend works. If it doesn't work, usually it's firewall settings problem.

2) HTTP 502 from load balancer usually indicates the health check of the load balancer thought the backend is unhealthy, check your health check config then.

See another similar question Google Load-balancer randomly failing requests to backend