Grokking the System Design Interview, Volume II
Vote

0% completed

Anatomy of Cassandra's Read Operation

Let’s explore Cassandra’s read path.

Let's dig deeper into the components involved in Cassandra's read path.

Caching

To boost read performance, Cassandra provides three optional forms of caching:

  1. Row cache: The row cache, caches frequently read (or hot) rows. It stores a complete data row, which can be returned directly to the client if requested by a read operation. This can significantly speed up read access for frequently accessed rows, at the cost of more memory usage.
  2. Key cache: Key cache stores a map of recently read partition keys to their SSTable offsets

.....

.....

.....

Like the course? Get enrolled and start learning!
M

Mircea C

· 4 years ago

This partition index summary file/partition index file form in essence a B-Tree, right ?

C

Camoen V

· 4 years ago

From the course material, it wasn't immediately clear to me when MemTable is accessed as opposed to when Row Cache is accessed while performing a read operation.

https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/dml/dmlAboutReads.html

It looks like MemTable is checked as the first step. It's then followed by checking RowCache -> in-memory bloom filters -> key cache -> partition summary + partition index.

Show 1 reply
Fei Shan

Fei Shan

· 2 years ago

  1. So from the Flow chart provided in this section, the Bloom Filter part there is no "No" branch, does Cassandra load that into Bloom Filter if found that TN?
  2. So the Row cache and Key cache is loaded when write or read (produce a read missing) ?