I was reading an article about warm recoverable web server with Compute Engine and Cloud Storage.
Normal scenario:
Failover:
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?
Hi @aleksvujic ,
We can use TCP load balancing to set up a pair of backend instance groups, with one of them designated as the failover target, as described in https://cloud.google.com/load-balancing/docs/network/networklb-setting-up-failover.
For a "mixed backends" topology (i.e., instance groups backend + GCS bucket backend), we can configure path-based routing. But I'm not sure whether/how the GCS bucket can be configured as a failover target.
Thank you for the answer, but we are not interested in TCP load balancing. We need to route the requests to correct backend service based on URL address.