Redis
Redis logoRedis · Feature trail

Active-Active Database Replication with CRDTs

1 post · May 2026

What this trail covers

This post introduces Conflict-free Replicated Data Types (CRDTs) as a mechanism to enable safer active-active database replication. It explains the challenges of active-active replication, such as write conflicts and data loss, and contrasts CRDTs with traditional approaches like Last Write Wins (LWW) and synchronous consensus protocols. CRDTs are presented as data structures with built-in merge rules that allow concurrent updates to converge to a consistent state without application-level reconciliation. Redis Cloud and Redis Software apply CRDT semantics in Active-Active for strings, hashes, lists, sets, sorted sets, streams, JSON, and HyperLogLog. The merge behavior varies by type: counters and sets converge through commutative operations, hashes merge at the field level, and strings fall back to LWW. The more naturally your workload maps to one of those mergeable types, the more naturally a CRDT-based replication model fits. It isn't a universal answer, though. Data types outside that list don't get CRDT semantics in Active-Active, so a workload built around them may need a different replication strategy. Some workloads are also about preserving invariants that need tighter coordination, such as financial transfers or uniqueness constraints, where one update has to block, validate, or reject another before commit.

All Redis trails