liveBook · Manning

Hinted handoff

As explained in ScyllaDB in Action

Hinted handoff is a replication technique that temporarily stores writes intended for an unavailable node and forwards them when that node recovers.

Hinted handoff temporarily stores a copy of a write when its intended replica is unavailable, then replays that write after the replica recovers. section 8.4.3

The process works as follows:

  • A coordinator detects that a replica is offline or fails to respond within the server-side write timeout. section 8.4.3
  • The coordinator writes a local hint containing a copy of the write request. section 8.4.3
  • When the replica returns, the coordinator replays the saved requests and hands the missed writes to that node. section 8.4.3
  • Hint generation stops after the configured max_hint_window_in_ms period; regular repairs and read repairs can then reconcile missed data. section 8.4.3

A replica goes offline during a write

Suppose a write reaches a coordinator while one replica is down. The coordinator saves a hint locally instead of losing the intended update. After the replica recovers, it replays the hint. This behavior also enables consistency level ANY to accept a write through a nonreplica node when all replicas are unavailable. section 8.2.2 section 8.4.3

Figure 8.20 In a hinted handoff, nodes send missed writes to offline nodes once they recover.
figure

Trace the recovery path in which nodes send missed writes to offline replicas. section 8.4.3

How ScyllaDB in Action covers it

How deep it goes
Explains coordinator detection, local hint storage, replay, and the configured hint window, while deferring longer outages to repairs.
Examples
Uses an offline replica, a locally saved write request, recovery replay, and consistency level ANY as concrete examples.
What it assumes
Assumes familiarity with replicas, coordinators, writes, and consistency levels.
What you can do after
Operate a replicated cluster by understanding how missed writes return to recovered nodes and when repairs become necessary.
How it connects
Connects hinted handoff with consistency levels, replication, repairs, read repairs, compaction, and eventual consistency.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.