liveBook · Manning

Token-range read

As explained in ScyllaDB in Action

Token-range scanning is a database extraction technique that queries data by contiguous token intervals aligned with cluster ownership boundaries.

A token-range read extracts data by querying contiguous intervals of the token ring instead of scanning an entire table through its partition key. This supports database-scale exports while limiting each query to a manageable range. section 12.0 section 12.1.1

Query one token interval

Use the TOKEN function to bound a CQL query: SELECT * FROM articles WHERE TOKEN(id) >= ... AND TOKEN(id) < ...; Cluster metadata can then identify the hosts owning each range. section 12.1.1 section 12.1.1

Tune the extraction around the workload:

  • Choose how much token range to query at once. section 12.1.1
  • Control concurrency and back off or retry queries that time out, including queries encountering very large partitions. section 12.1.1
  • Consider a separate datacenter when extraction traffic would burden the primary datacenter. section 12.1.1

How ScyllaDB in Action covers it

How deep it goes
Explains bounded queries, range ownership, concurrency, retries, and workload isolation without detailing an implementation program.
Examples
Uses an articles CQL query, Figure 12.1, and nodetool describering output showing token ranges and owning hosts.
What you can do after
Operate/configure bulk reads by selecting token ranges, tuning concurrency, and applying backoff and retry behavior.
How it connects
Connects token functions with partition keys, cluster ownership, bulk reading, data extraction, and change data capture.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.