5

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?

Sam Carlson
  • 1,891
  • 1
  • 17
  • 44

1 Answers1

-1

Failover response can be done in many ways like at DNS(Cloud DNS, Cloudflare failover). Cloud orchestration (GC deployment, Terraform) at client side (CDN approach) since you want at load balancer level let’s see how it works. As you can see in the link traffic is split between TCP, UDP, HTTP, HTTPS at the extreme LB level. If at all it is your use case in the first place. I mean if you use an external load balancer. As detailed in the chart in GCP docs.

For an internal HTTP load balancer, it can do a failover to healthy instances(GCE, GKE, GAE etc)in the same region. For an external LB you need an external LB as well. There are little differences for External load balancer types like Global, Classic(Premium tier) regional check them for detailed information. Now let’s see how load balancer works for static sites hosted in Cloud storage(GCP’s S3 equivalent). As said in GCP docs this is how Static site on CDN is created. Then you need to further configure to redirect data between instances and CDN. See link1 and link2. In the same docs see timeout, fault etc.

For me personally I think Cloudflare failover can be better.

  • 1
    I am sorry but you didn't answer my question. Can a GCP external load balancer redirect the traffic to the static error site *automatically* if application running on compute engine is not healthy? – Sam Carlson Apr 04 '22 at 06:06