Course contentsShow
← Computer Science
Lesson 1743 of 2,87239. NoSQL and Modern DatabasesFree lesson

Consistency and Replication in Column Stores

Understand tunable consistency levels, quorum reads/writes, and replication strategies in distributed column databases.

Consistency and Replication in Column Stores

You'll learn how column-family databases balance data availability and consistency across distributed nodes using tunable settings and quorum-based operations.

The Core Challenge

Column stores like Cassandra distribute data across many nodes for high availability. But what happens when one node has newer data than another? Unlike traditional ACID databases with strict consistency, column stores let you tune the trade-off between consistency (all nodes agree) and availability (fast responses even if some nodes are down).

Tunable Consistency Levels

You control how many replica nodes must respond before an operation succeeds:

  • ONE: Fastest; only one replica confirms (least consistent)
  • QUORUM: Majority of replicas must agree (balanced)
  • ALL: Every replica confirms (slowest, most consistent)

Think of it like voting: Do you need one person's opinion, a majority vote, or unanimous agreement?

Quorum Reads and Writes

A quorum ensures correctness: if you write to a majority of replicas and read from a majority, you're guaranteed to see the latest data because the sets overlap.

Formula: W + R > N (write nodes + read nodes > total replicas)

Example: With 3 replicas, writing to 2 nodes and reading from 2 nodes ensures you always hit at least one up-to-date node.

Replication Strategies

Column stores replicate data to multiple nodes:

  • SimpleStrategy: Copies to adjacent nodes (development only)
  • NetworkTopologyStrategy: Distributes across data centers for disaster recovery

Replication provides fault tolerance—if one node dies, others have copies.

Key Takeaway: Column stores offer tunable consistency through configurable read/write quorum levels, letting you choose between strong consistency and high availability based on your application's needs.