BlogsRedisActive-Active Database Replication with CRDTs

Active-Active Database Replication with CRDTs

Active-Active Database Replication with CRDTs

1
posts
2026

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. The post uses an inventory counter example to illustrate how CRDTs can signal inconsistencies rather than silently losing data. It highlights that Redis Cloud and Redis Software leverage CRDT semantics for various data types (strings, hashes, lists, sets, sorted sets, streams, JSON, HyperLogLog) to provide multi-region writes with automatic conflict resolution.

2026

How Conflict-free Replicated Data Types power active-active database replication

5/27/2026

Introduces Conflict-free Replicated Data Types (CRDTs) as a solution for active-active database replication, detailing how their built-in merge rules resolve concurrent updates automatically. Contrasts CRDTs with Last Write Wins (LWW) and synchronous consensus protocols, explaining the trade-offs in write latency, availability, and data integrity. Provides a concrete example of inventory management to demonstrate how CRDTs signal inconsistencies (e.g., negative counts) instead of silently losing data, enabling better application-level handling of overselling. Mentions that Redis Cloud and Redis Software implement CRDT semantics for several data types to support active-active geo-distribution.