How are read requests accomplished?

A coordinator node can send three types of read requests to a replica:

  • A direct read request

  • A digest request

  • A background read repair request

In a direct read request, the coordinator node contacts one replica node.

In a digest request, the coordinator node first contacts the replicas specified by the consistency level. The coordinator node sends requests to replicas that respond the fastest. The contacted nodes respond with a digest of the requested data.

If multiple nodes are contacted, the rows from each replica are compared in memory for consistency.

If any replica nodes have out-of-date data, the coordinator node sends a background read repair, then forwards the result from the replica with the most recent data (based on the timestamp) back to the client. Read repair requests ensure that the requested row is made consistent on all replicas involved in a read query.

For illustrated examples of read requests, see Examples of read consistency levels.

Rapid read protection using speculative_retry

When the originally selected replica nodes are down or taking too long to respond, rapid read protection allows HCD to still deliver read requests. If the table has been configured with the speculative_retry option, the coordinator node for the read request will retry the request with another replica node if the original replica node exceeds a configurable timeout value to complete the read request.

dseRapidReadProtection
Rapid read protection using speculative_retry
30

Coordinator node

30

Chosen node

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com