简体   繁体   中英

What's the point of using Hinted Handoff in Cassandra, especially for consistency>ANY?

In Cassandra, Hinted Handoff(HH) only happens when consistency level can be met. Also, hints are unreadable to clients. With consistency level > ANY, using HH can improve neither write nor read availability. Requests still fail since the online replicas are insufficient to meet consistency requirements.
What's the point of using Hinted Handoff? Trading capacity for performance? Why not just synchronize the failed-and-back node with other replica nodes (ie re-replication)?

Hinted handoff is just additional anti entropy measure. ie you don't have to run repairs right away and data gets consistent (if there was minor outage) when the node comes back online.

I guess it would just be too complicated to take take care of this with replication all the time because you would have to mark somehow the data that hasn't been replicated etc. Basically you would again have something similar to hinted handoff.

Some stuff from official docs: https://docs.datastax.com/en/cassandra/2.1/cassandra/dml/dml_about_hh_c.html#concept_ds_ifg_jqx_zj__extreme-write-availability

Basically it's to maximise write throughput of the cluster while there are minor outages. It's configurable and you can disable it in case that you described when there are high consistency levels involved in both read and write.

Plus you have to run the "re-replication" ie repair anyway. Because hinted handoff can't really take care of it all.

Personally I used them in a situation R-CL: ONE, W-CL: ONE, RF: 2, NODES: 3. They were very helpful because we maintained the write throughput while doing maintenance and rolling restarts on the cluster. So I would say it works well in situation where W-CL < RF.

Then again there is opinions like this one:

https://blog.threatstack.com/scaling-cassandra-lessons-learned

In fact, just disable them in the configuration. It's too easy to lose data during a prolonged outage or load spike, and if a node went down because of the load spike you're just going to pass the problem around the ring, eventually taking multiple or all nodes down. We never experienced this on Cassandra, but have on other systems that supported hinted handoffs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM