Why it matters
Global apps need low latency worldwide. Cassandra's multi-DC model handles this without sacrificing consistency locally. Getting the setup right shapes user experience.
Advertisement
The architecture
Datacenter definition: logical grouping of nodes. Configured per keyspace via NetworkTopologyStrategy with per-DC replication factor.
LOCAL_* consistency: strong within DC. Reads and writes only wait for local replicas.
Advertisement
How it works end to end
Writes: coordinator writes to local replicas synchronously, cross-DC replicas asynchronously.
Reads: LOCAL_QUORUM reads from local DC only. If local DC fails, application must retry with different CL or route to another DC.
Cross-DC repair essential: async replication can drop writes; regular repair catches divergence.