How are read requests accomplished?

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

There are three types of read requests that a coordinator node can send 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, which 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 DataStax Enterprise (DSE) to still deliver read requests. If the table has been configured with the property, 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.

Figure 1. Recovering from replica node failure with rapid read protection

Coordinator node

Chosen node