Database Reference
In-Depth Information
HintedHandoffs
Although HintedHandoffs are not required, they are highly encouraged. They
serve two main purposes:
They allow full write availability when consistency is not required. In oth-
er words, when the write consistency level is not set to QUORUM ,
LOCAL_QUORUM , or ALL , the HintedHandoff will ensure that the data
gets to the other nodes.
They improve response consistency after downtime such as network fail-
ures or power failures.
The way Hints work is that when a write request comes in and its destination
is down or not responding, the coordinating node will store it locally. There is
a ColumnFamily called Hints in the System Keyspace designed specifically for
dealing with Hints. Similar to the Oplog in Mongo or Binlog in MySQL, the Hints
table will enable another node to replay write operations the way they came in.
Once the coordinator node holding the Hints finds out that the downed node is
back up, it will begin to send the rows corresponding to that node from the Hints
table. The coordinator node will also check every ten minutes to see if there are
any Hints for writes that timed out during an outage too brief for the FailureDetect-
or to notice over the Gossip protocol.
There are a few items to be aware of with regard to HintedHandoffs. Hinted
writes do not count toward ConsistencyLevel requirements. This means that a de-
graded cluster (a cluster that is missing one or more nodes) is still doing the same
number of writes, just with fewer nodes to absorb the write load. Cassandra also
attempts to be smart about Hints by doing things like removing Hints for nodes
that have been decommissioned or had their tokens removed. It will also remove
Hints for ColumnFamilys that have been dropped. The last item of note for Hin-
tedHandoffs is that they do not replace a repair on hardware failure. Historical data
can be lost or Hints that have not been replayed on the downed node can poten-
tially show up as missing data. As a result, repairs after a hardware failure or ex-
tended outage period are advised.
Search WWH ::




Custom Search