AlgoMaster Logo

CRDTs

Medium Priority15 min readUpdated July 4, 2026
AI Mock Interview

Practice this topic in a realistic system design interview

Replicating data across regions sounds simple until two replicas accept different writes at the same time.

The usual fixes are not great:

  • Coordinate before every write. This is safer, but slower.
  • Pick the "latest" write. This is fast, but can lose data.

A Conflict-Free Replicated Data Type (CRDT) gives another option. It is a data structure that can be copied across many nodes, updated independently, and later merged into the same final state without coordination.

Each replica accepts writes locally. Later, replicas exchange data. A merge function combines their copies into the same result, even if messages arrive in different orders or more than once.

There is no single "winner" that discards everyone else. The merge rule is built into the data type.

This fits multi-region databases that accept writes everywhere, offline-first apps, collaborative editors, shared counters, and presence systems.

CRDTs do not make replication free. They move the cost into the data type itself and into the extra metadata that travels with the data.

This chapter explains how CRDTs merge without coordination, where they help, and where they are the wrong tool.

1. Why CRDTs Exist

Premium Content

This content is for premium members only.