0

I have a setup on Google Cloud where an Internal HTTP Load Balancer routes request to a Managed Instances Group containing multiple VMs.

If I configure a retry policy that e.g retries 50x HTTP errors, will the Load Balancer retry the request on the exact same VM as the original request was made on, or will the load balancer pick the VM for the retry randomly using the configured load balancing algorithm?

Is there some documentation around this behavior?

Flagbug
  • 2,093
  • 3
  • 24
  • 47
  • 1
    It depends on the error message and configuration which you have made in your load balancer. In general if you have enabled or configured [session affinity](https://cloud.google.com/load-balancing/docs/https) an user’s subsequent requests are mapped to the same VM until the instance fails the health check. If your instance starts failing the health checks, based on your MIG settings the load balancer will automatically switch the traffic to a healthy instance. – Kranthiveer Dontineni Aug 16 '23 at 12:37
  • Hi `Flagbug` for better visibility of the community I'm posting the same as an Answer. – Kranthiveer Dontineni Aug 17 '23 at 07:36
  • Hi `Flagbug` have you got any chance to go through the answer. please upvote or accept the answer if you find it useful. – Kranthiveer Dontineni Aug 23 '23 at 03:07

1 Answers1

0

It depends on the error message and configuration which you have made in your load balancer. In general if you have enabled or configured session affinity an user’s subsequent requests are mapped to the same VM until the instance fails the health check. If your instance starts failing the health checks, based on your MIG settings the load balancer will automatically switch the traffic to a healthy instance.