Advanced25 min readยท Topic 10.5

Geographically distributed systems

Multi-region replication, data sovereignty, CRDTs, operational transformation

๐ŸŒKey Takeaways

  • 1
    Speed of light sets a hard floor: ~67ms minimum round-trip US East โ†” Europe, ~133ms to Asia-Pacific
  • 2
    CRDTs (Conflict-free Replicated Data Types): data structures that merge automatically without coordination
  • 3
    Data sovereignty: GDPR, data residency laws require data to stay in specific geographic regions
  • 4
    Multi-region active-active requires careful conflict resolution: LWW, CRDTs, or operational transform

Systems That Span the Globe

When your system serves users on multiple continents, physics becomes the enemy. The speed of light introduces ~1ms per 200km of fiber. A round trip from New York to London takes at least 67ms, regardless of your optimization. Designing globally distributed systems means working within these constraints.

Conflict Resolution Strategies

Simplest strategy: timestamp each write, highest timestamp wins in case of conflict.

Easy but loses data: if two users edit simultaneously in different regions, one edit silently disappears.

Acceptable for: user profile updates, non-critical settings. Unacceptable for: collaborative editing, financial data.

Speed of Light Latency

67ms
NY โ†” London RTT
133ms
NY โ†” Tokyo RTT
280ms
London โ†” Sydney RTT
1ms
per 200km of fiber

Advantages

  • โ€ขCRDTs provide automatic conflict resolution
  • โ€ขMulti-region active-active serves users with low latency globally
  • โ€ขData sovereignty compliance is built into the design

Disadvantages

  • โ€ขPhysics limits latency (speed of light)
  • โ€ขCRDTs are limited to certain data structures
  • โ€ขMulti-region doubles infrastructure cost minimum

๐Ÿงช Test Your Understanding

Knowledge Check1/1

What are CRDTs?