liveBook · Manning

Global load balancing

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

The distribution of application traffic across service endpoints located in multiple regions or environments.

Global load balancing distributes application traffic across service endpoints in multiple regions or environments. It can route all traffic to a passive backup during a failure or divide requests between active regions. section 9.1.2

Use weighted backends to manage reliability during infrastructure changes:

  • Create a separately named passive environment in another region with infrastructure as code. section 9.1.2
  • Set the active backend weight to zero and the passive backend weight to 100 to fail over production traffic. section 9.1.2
  • Debug the failed active environment while the passive environment continues serving requests. section 9.1.2
  • Refactor toward active-active operation when both regions should process requests and tolerate a regional failure. section 9.1.2

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Implements regional environments and weighted failover in code, then points toward active-active routing without detailing its implementation.
Examples
Uses blue and passive sundew environments in us-central1 and us-west1, with backend weights changed from 0/100 during failover.
What it assumes
Uses infrastructure-as-code configuration and separately provisioned service environments in multiple regions.
What you can do after
Operate/configure weighted backends to fail over production traffic and preserve service while debugging a failed region.
How it connects
Connects infrastructure as code, active-passive configuration, active-active configuration, failover, and weighted routing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.