Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Automatic redirection to static error site if web server is unavailable

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

Normal scenario:

9z7e9

Failover:

GaGBo

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?