0

I was reading an article about warm recoverable web server with Compute Engine and Cloud Storage.

Normal scenario:

normal scenario

Failover:

failover scenario

Documentation states that:

In an outage, you update the external HTTP(S) Load Balancing configuration and fail over to a static site in Cloud Storage.

Can the change of external HTTP(S) Load Balancing configuration occur automatically based on some health checks? For example, if load balancer detects that website deployed on compute engine stopped responding, it automatically redirects the traffic to static site in Cloud Storage. Once web server starts working again, load balancer automatically redirects requests back to it. How can I achieve this?

Mark
  • 101
  • 2
  • You can refer to [this](https://stackoverflow.com/a/71633999/15745106) stackexchange link which you have asked . Do you have any doubt regarding the solution provided. Also check this [troubleshooting](https://cloud.google.com/load-balancing/docs/https/troubleshooting-ext-https-lbs) docs for more information. Check the doc once and let me know if this helps – Bakul Mitra Apr 16 '22 at 07:40
  • Also about the question that you asked "if load balancer detects that website deployed on compute engine stopped responding, it automatically redirects the traffic to static site in Cloud Storage." Yes it does. – Bakul Mitra Apr 16 '22 at 07:51
  • @BakulMitra Are you sure? I tried it and it doesn’t seem to work like that. When health check for instance group backend service type failed, it didn’t redirect the traffic to different backend service of type Cloud Storage bucket. Can you elaborate how this could be achieved or provide a link to the documentation where this is explained? I think that fallback between different backend service types is not possible in HTTP(S) load balancer. – Mark Apr 16 '22 at 20:16
  • You can either have two separate backend services - one with cloud storage and other with VMs. If all VMs in one backend fails - it will automatically only distribute traffic to the Storage Bucket. But if a health check fails the LB removes the node from the backend pool and makes it ineligible for distributing requests then you can raise a feature request for the same [here](https://cloud.google.com/support/docs/issue-trackers). – Bakul Mitra Apr 27 '22 at 13:47
  • Hello @Mark, if you think that my answer helped you, please consider accepting it (✔️). I'd really appreciate it. Have a great day, thanks! – Bakul Mitra May 17 '22 at 11:35

1 Answers1

0

You can either have two separate backend services - one with cloud storage and other with VMs. If all VMs in one backend fails - it will automatically only distribute traffic to the Storage Bucket. But if a health check fails the LB removes the node from the backend pool and makes it ineligible for distributing requests then you can raise a feature request for the same here

Bakul Mitra
  • 111
  • 3