liveBook · Manning

Active-passive configuration

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

An active-passive configuration maintains an active environment that serves traffic and a separate passive environment available for fallback or change activities.

An active-passive configuration runs one environment as the primary service for user requests while keeping a duplicate environment idle as backup. Failover redirects traffic to the passive environment when the active one fails or a change causes trouble. section 9.1.2

The pattern reduces the blast radius of infrastructure changes and improves reliability, but it requires duplicated resources and a tested traffic-switching path. Infrastructure as code can reproduce the active region in a passive region. section 9.1.2 section 9.4

A practical implementation follows these steps:

  • Duplicate the production environment in another region, changing its region, network range, names, labels, and version identifiers. section 9.1.2
  • Keep normal traffic on the active environment while testing changes there. section 9.1.2
  • If the active environment fails, assign traffic to the passive environment; otherwise, update the passive environment after validating the change. section 9.1.2

Regional sundew fallback

A production sundew system serves from us-central1 while an idle duplicate runs in us-west1. A load-balancing configuration gives the active service weight 0 during failover and the passive service weight 100, temporarily sending all requests to the backup. section 9.1.2

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

How deep it goes
Explains regional duplication, traffic switching, IaC implementation, and failover, while contrasting smaller-scope blue-green deployment.
Examples
Demonstrates a sundew system duplicated from us-central1 to us-west1 and switched through weighted backend services.
What it assumes
Assumes infrastructure-as-code and traffic-management knowledge while defining redundancy, reliability, and failover explicitly.
What you can do after
Operate/configure a passive regional environment and redirect traffic to it during active-environment failure or risky changes.
How it connects
Connects redundancy in IaC with failover, reliability, blue-green deployment, and active-active configuration.

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.