Score:0

Automatic redirection to static error site if web server is unavailable

mv flag

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?

Bakul Mitra avatar
cn flag
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 avatar
cn flag
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.
Mark avatar
mv flag
@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.
Bakul Mitra avatar
cn flag
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 avatar
cn flag
Hello @Mark, if you think that my answer helped you, please consider accepting it (✔️). I'd really appreciate it. Have a great day, thanks!
Score:0
cn flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.