Apache Cassandra

Tunable Consistency & Hinted Handoff

Understand how hinted handoff and read repair work alongside consistency levels to maintain data integrity during transient failures.

Tunable consistency isn't just about picking a consistency level per query — it's supported by several background mechanisms that help Cassandra maintain data integrity despite node failures and network issues, without requiring synchronous coordination for every write.

Hinted handoff is like leaving a sticky note reminder for a coworker who stepped away, so you can hand them their messages the moment they're back at their desk instead of waiting for the next scheduled office-wide memo review. Read repair is like noticing two colleagues have different versions of a memo when you ask both, and quietly handing the older one the newer version on the spot.

Key Concepts

1
Hinted handoff is a mechanism where, if a replica is temporarily unreachable during a write, the coordinator stores a hint (a record of the missed mutation) locally and replays it to the replica once it comes back online. This allows writes to succeed at the requested consistency level even when some replicas are briefly down, without requiring a full repair to catch that replica up later (though repair remains a backstop for hints that expire or exceed their storage window).
Hinted handoffhint
2
Read repair is a complementary mechanism: when a read is performed at a consistency level requiring more than one replica, and those replicas return different versions of the data, Cassandra reconciles the discrepancy by writing the most recent value back to the stale replicas — either as a foreground blocking operation part of the response, or asynchronously in the background depending on configuration.
Read repair
3
Together, hinted handoff (write-side healing) and read repair (read-side healing) reduce reliance on scheduled anti-entropy repair for day-to-day consistency drift, though they don't replace the need for periodic full repairs, especially for tombstone propagation.