Sub topic 1
What active-active means and how it differs from active-passive
Prerequisites
This chapter assumes you know basic cloud networking and DNS, how stateless web services sit behind load balancers, and the basics of relational or NoSQL databases. It also assumes you treat availability and latency as service goals. Later chapters cover routing, replication and conflicts in detail. Here you only build the working model.
The core idea
A multi-region design runs one service in two or more geographic regions. The two main patterns differ in who serves live traffic.
- Active-passive: one region (the primary) serves all traffic. A second region (the standby) holds a copy of the data and waits. If the primary fails, you promote the standby.
- Active-active: every region serves live traffic at the same time. Each region can accept reads and, in most designs, writes.
The difference shows up during a failure. In active-passive, you must detect the failure, promote the standby and redirect users. In active-active, the surviving regions are already serving users. You only stop sending traffic to the failed region.
What you gain
- Lower latency. Users reach a nearby region instead of a distant primary.
- Faster recovery. There is no promotion step, so the recovery time objective (RTO, how long an outage lasts) can drop to seconds or less.
- Proven standby capacity. Every region carries real traffic daily, so you find broken configuration before an outage does. A passive region often fails on its first real use because nobody exercised it.
What it costs
The hard part is data. When two regions both accept writes, the same record can change in both places before either change arrives at the other. You must then decide what the right answer is. Active-passive avoids this because only one region writes.
Active-active also forces trade-offs between consistency and latency. Waiting for every region to confirm a write is slow. Not waiting means a region may briefly read stale data. The later chapters on CAP and replication cover these choices.
You also pay for capacity. If you have two regions and one fails, the other must absorb the full load. That sets a minimum headroom in each region.
Comparing the patterns
| Aspect | Active-passive | Active-active |
|---|---|---|
| Regions serving traffic | One | All |
| Failover | Detect, promote, redirect | Remove failed region from routing |
| Typical RTO | Minutes | Seconds |
| Write conflicts | None, one writer | Must be prevented or resolved |
| Standby readiness | Often untested | Tested by daily traffic |
| Complexity | Lower | Higher |
When each fits
Choose active-passive when your recovery target allows minutes of downtime, your data model is hard to make conflict-free, or cost and simplicity matter more than speed. Choose active-active when users are spread across the world, when downtime costs more than the added complexity, or when you need a regional outage to be nearly invisible.
Exercise
A team runs two regions. Region B receives no user traffic but has a continuously updated database replica. After a failure in region A, an operator must promote B. Is this active-active or active-passive, and what step does active-active remove?
Show answer
It is active-passive, because only region A serves live traffic. Active-active removes the promotion and redirect step, since every region already serves users and failover only means removing the failed region from routing.