Active-active (CRDT-based) vs active-passive multi-region Redis, Redis Enterprise geo-replication, conflict resolution strategies, latency-vs-consistency trade-offs, and when global distribution is the wrong answer.
A-12 — Multi-Region Redis: Active-Active and Geo-Replication
Who this module is for: You serve users across multiple geographic regions and need Redis to be close to each user — low-latency reads and writes from any region. This module covers the two multi-region Redis architectures (active-passive and active-active), the CRDT-based conflict resolution that enables active-active, and when global Redis distribution creates more problems than it solves.
Why Multi-Region Redis
A Redis instance in us-east-1 adds 120ms+ of round-trip time for a user in ap-southeast-1 — completely negating Redis's sub-millisecond advantage over a database. For globally distributed applications, you need Redis deployed close to each user group.
Two architectural options:
Active-Passive: Regional Read Replicas
The simplest multi-region setup: the primary Redis is in one region; replicas in other regions serve reads with some lag.
Read path: Applications in eu-west-1 read from the local replica with < 1ms latency.
Write path: All writes go to us-east-1. An API call from ap-southeast-1 that writes data adds 150–250ms of round-trip time to reach the primary. Unacceptable for write-heavy workloads.
Failover: If the primary fails, you manually promote a replica using REPLICAOF NO ONE and update your application's connection strings. Sentinel can automate this within a single region but not across regions (network latency makes cross-region failure detection unreliable).
When active-passive is appropriate:
- Read-heavy workloads where most data is read many times and written rarely
- Data that is written in one primary region (user-generated content flow is unidirectional)
- Cache workloads where cross-region write latency is acceptable
Active-Active: Every Region Writes Locally
In active-active mode, each regional Redis instance accepts writes. Changes propagate to other regions asynchronously. When two regions write to the same key simultaneously, conflict resolution determines the outcome.
Write path: Each region writes locally with < 1ms latency. The write propagates to other regions asynchronously.
Conflict scenario:
CRDTs: Conflict-Free Replicated Data Types
CRDTs (Conflict-Free Replicated Data Types) are data structures designed so that concurrent operations from different replicas can be merged without conflicts — regardless of order.
Redis Enterprise Geo-Distribution (and Redis Cloud) implements CRDTs for Redis data types:
| Redis Type | CRDT Semantics |
|---|---|
| String | Last-Write-Wins (LWW) based on logical timestamp |
| Counter (INCR) | All increments are summed across regions |
| Set | All adds are merged; deletes only remove adds the deleting replica had observed ("observed-remove"/add-wins) |
| Sorted Set | All ZADDs are merged; conflicts resolved by LWW |
| Hash | Field-level LWW — different fields can come from different regions |
| List | Append-only merging; ordering by logical timestamp |
Last-Write-Wins (LWW)
The write with the highest logical timestamp (Lamport clock or hybrid logical clock) wins. For String types:
LWW is simple but has a failure mode: if two writes happen at nearly the same time (within clock synchronisation tolerance), the winner is determined by clock drift — arbitrary from the application's perspective.
Sign in to keep reading
The rest of this module is free — sign in with Google to unlock it and track your progress.
Sign in & RegisterDiscussion
0Join the discussion