How a request travels

The path of a read or a write from the driver to the disk.

A request from your driver can reach any node. From there it travels to the range that holds the data and comes back with the answer.

How it works

driver ──▶ any node ──▶ router: which range and which leader?
                             │
                             ▼
                 range leader ──▶ Raft log ──▶ majority on disk
                             │
                             ▼
                     apply and answer

The node that receives the request hands it to its router, which looks up in the catalogue which range holds each document and who its leader is, and if that leader lives on another node it forwards the operation over the cluster's internal network without the driver noticing. The leader evaluates it and, if it writes, proposes it on the range's Raft log. Once a majority has it on disk, it is applied and the answer goes back to the driver.

A query that touches several ranges is spread across them. The router then merges the results. A transaction that touches several ranges is coordinated with a transaction record.

What it means for your application

Your application can put any node in the connection string. A node that goes down only cuts the requests it had in flight. The driver retries them on another node.

Limits

Each hop between nodes adds network latency, which barely shows inside one data centre and grows when the replicas of a range live in different regions. A query that touches many ranges waits for the slowest one.

Learn more