Cassandra Internals: The Read Path (Tyler Hobbs, DataStax) | Cassandra Summit 2016
Why Stack Overflow recommends it
Stack Overflow users link it when answering Cassandra questions about how reads work internally, such as multi-SSTable reads, digest requests and query design.
Recommended by 2 people across 2 different months, 2017 to 2019.
What it is
A 34-minute Cassandra Summit 2016 talk by DataStax committer Tyler Hobbs that walks through the full Cassandra read path, from the driver to SSTables on disk. It covers coordinator and replica selection, paging, failure and inconsistency handling, index lookups and bloom filters.
What people said
Recommends Carlos Monroy Nieblas · 2019-04 · Stack Overflow · on “Optimization of a query which uses arithmetic operations in WHERE clause”
One of the main differences between Cassandra and relational databases is that the definition of the tables depend on the query that will be used. The conditional of how the data will be retrieved ( WHERE statement ) should be included in the primary key as it will perform better than an index on the table. There are multiple resources regarding the read path, and the quirks of primary keys vs indexes, this talk [this video] from the Cassandra Summit may be useful.
Recommends LHWizard · 2019-09 · Stack Overflow · on “How Cassandra read works with single column datamodel partition in multiple SSTables?”
Hi, I'm not sure what version of cassandra you're using, but this is a great talk by Tyler Hobbs on the read path internals [this video]
Cites TomerSan · 2017-12 · Stack Overflow · on “Understanding read from a single partition in Cassandra”
There is nice tool called CQL TRACING that can help you understand and see the flow of events once a SELECT query is executed. cqlsh> INSERT INTO test.nodedata (nodeip, readiops) VALUES (1, 10); cqlsh> INSERT INTO test.nodedata (nodeip, readiops) VALUES (1, 20); cqlsh> INSERT INTO test.nodedata (nodeip, readiops) VALUES (1, 30); cqlsh> select * from test.nodedata ; nodeip | readiops --------+----------- 1 | 10 1 | 20 1 | 30 (3 rows) cqlsh> SELECT MAX(readiops) FROM test.nodedata WHERE nodeip = 1; system.max(readiops) ----------------------- 30 (1 rows) Now let's set cqlsh> TRACING ON and run the same query again. cqlsh> TRACING ON Now Tracing is enabled cqlsh> SELECT MAX(readiops) FROM test.
Cites Coder · 2018-01 · Stack Overflow · on “Digest request in Cassandra”
I have few questions regarding the digest request, I read through the docs and the following informations are not up to the point, 1) Lets say I have 10 node cluster with the RF =3 and RC = 2, Also for understanding let the Replicas be Node 1, Node 2 and Node 3 and Coordinator be Node 4. For the read request, As per my understanding first coordinator (Node 4) sends the direct request to one of the node with the lower latency (Dynamic snitch) say Node 1 and gets the data, then after receiving the data It sends the digest request to one of the next latency node say Node 2 and gets only the hash and compares with the hash calculated from direct request. Ques 1 : Is the digest request send paral