Microservices Patterns/Deep Cuts (Optional)

Multi-Region Service Topology

Active-active vs active-passive, global load balancing, data residency, and failover orchestration across regions.

5/5Overview: 35m

Active-active vs active-passive

ModeBehaviorData challenge
Active-passiveStandby region cold/warmReplication lag on failover
Active-activeAll regions serve trafficConflict resolution, split brain

Global load balancing

Anycast / GeoDNS route user to nearest healthy region. Health checks remove failed region from DNS.

Latency wins; consistency hard for writes spanning regions.

Data residency

EU users → EU region only (GDPR). Metadata routing at gateway; no cross-border PII replication without legal basis.

Failover orchestration

  1. Detect region failure (SLO burn, health checks)
  2. Shift traffic via DNS/GSLB (TTL matters — stale DNS = partial outage)
  3. Promote read replica / break glass runbook for writes

Distributed Systems → Replication — quorum, lag, split-brain avoidance.

Cell-based / regional isolation

Stripe/Amazon pattern: cells — self-contained shards of stack. Failure in cell A doesn't take cell B.

Staff interview: "We'd never do active-active writes on same aggregate across regions without CRDT or Spanner-class store."

Cross-reference: Distributed Deep Cuts for Spanner/TrueTime when interviewer pushes global consistency.

Further Reading

Hands-On Tasks (Optional)

Architecture drills and whiteboard exercises. Assumes Communication & Data Transfer and Distributed Systems fundamentals.

  • Sketch active-active read path

    Users in US and EU hit nearest region. Writes to orders — same-region only or global? Draw traffic flow and one consistency trade-off.

    20m