Sub topic 16
Cost, complexity and when not to use active-active
This chapter assumes you know the earlier material: how active-active differs from active-passive, RTO and RPO targets, capacity headroom, and replication trade-offs. Here you decide whether the design is worth what it costs.
Where the cost comes from
Active-active costs more than a single region in four ways.
- Compute headroom. Each region must absorb a failed region's traffic. With N regions, each runs at no more than (N-1)/N of its capacity in normal operation. With two regions, that is 50% utilization.
- Data transfer. Cross-region replication is billed per gigabyte. Chatty replication, such as large rows or frequent updates, can dominate the bill.
- Duplicated services. Databases, caches, queues, load balancers, and monitoring all run in every region.
- People and time. Engineers must understand conflicts, lag, and failover. On-call work gets harder. Testing takes longer.
A rough comparison for a service that costs 100 units in one region:
| Design | Approximate compute cost | Main extra costs |
|---|---|---|
| Single region | 100 | None |
| Active-passive (warm standby) | 130 to 160 | Standby capacity, replication |
| Active-active, 2 regions | 200 or more | Headroom, replication, conflict handling |
| Active-active, 3 regions | 150 or more | Lower headroom per region, more links to operate |
These figures are illustrative. Measure your own.
Complexity you take on
The cost that is hardest to see is correctness work. Every write path needs an answer to "what if two regions write this at once?" You need write ownership or a conflict rule. Retries need idempotency. Reads may be stale, so features must tolerate that. Each new feature repeats this analysis.
Operational complexity grows too. You must watch replication lag, run failover drills, and handle partial failures that are harder to diagnose than a clean outage.
When not to use active-active
Choose something simpler when any of these hold.
- A few minutes of downtime is acceptable. Active-passive with automated failover meets many RTO targets for far less.
- The data needs strong consistency everywhere. Examples are account balances and inventory counts that cannot oversell. Without a clean write owner, you pay in latency or risk.
- Users are in one geography. You gain little latency benefit.
- The team is small or inexperienced with distributed systems. A design you cannot operate or test fails in ways you do not expect.
- Residency rules forbid copying data between the regions you would use.
A simple cost check
Compare the expected cost of downtime with the extra spend.
def worth_it(outage_hours_per_year, cost_per_hour, extra_annual_cost, share_avoided=0.9):
"""Return True if avoided outage loss exceeds the extra cost.
share_avoided is the fraction of outage time active-active prevents."""
avoided = outage_hours_per_year * cost_per_hour * share_avoided
return avoided > extra_annual_cost
# 4 hours of regional outage per year, 50,000 per hour, 300,000 extra spend
print(worth_it(4, 50_000, 300_000)) # False: avoided loss is 180,000This ignores engineering time, which makes the case for active-active weaker still. It also ignores reputational harm, which may strengthen it.
Exercise
A team runs a internal reporting tool used in one country during office hours. Leadership asks for active-active across three regions. Give two reasons to push back and one cheaper alternative.
Show answer
Reasons: users are in one geography, so there is little latency benefit; and the tool can likely tolerate minutes of downtime outside critical hours, so the cost and conflict-handling work are not justified. Alternative: a single region with multi-AZ deployment and cross-region backups, or active-passive with a warm standby if a faster recovery is needed.