# Wide-Column Stores: Cassandra and ScyllaDB

> Understand how Cassandra-style databases handle massive write volumes across many nodes and data centers. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/backend/cassandra-wide-column
Last updated: 2026-11-28

Understand how Cassandra-style databases handle massive write volumes across many nodes and data centers.

Advanced · about 5 hours · difficulty 4/5

Learn first: [NoSQL Families and When to Use Them](https://www.internhack.in/roadmaps/tracks/backend/nosql-fundamentals)

**Apache Cassandra** and its C++ reimplementation **ScyllaDB** are built for workloads that write enormous amounts of data and must stay available even when nodes or whole data centers fail: messaging history, IoT telemetry, activity feeds.

### How it works

- Data is split into **partitions** by a partition key and spread around a ring of nodes using consistent hashing. Each partition is replicated to several nodes (the **replication factor**).
- There is no primary node: any node can accept writes, which makes it very available.
- Writes go to a commit log and memtable and are flushed to immutable SSTables that get **compacted** later, so writes are cheap.

### Modeling with CQL

CQL looks like SQL but the rules differ. You design **one table per query**:

- The partition key decides which node holds the data; the **clustering columns** decide sort order inside a partition.
- No joins and very limited filtering. Duplicating data across tables is normal.
- Keep partitions bounded (for example bucket messages by conversation and month).

### Tunable consistency

Each query picks a consistency level such as `ONE`, `QUORUM` or `ALL`. With replication factor 3, writing and reading at QUORUM gives you read-your-writes; using ONE is faster but may return stale data.

### When not to use it

Small datasets, ad hoc analytics, workloads needing transactions across rows, or teams without the operational capacity to run a distributed database. Managed services (Astra, ScyllaDB Cloud, Amazon Keyspaces) lower that cost.

You are ready to move on when you can design a table for "latest 50 messages in a conversation" and explain what QUORUM means with replication factor 3.

## Key concepts

- **Partitions and consistent hashing**
- **Replication factor**
- **Partition keys and clustering columns**
- **Query-first table design**
- **Tunable consistency levels**
- **Compaction and tombstones**

## Mini project

Run Cassandra or ScyllaDB in Docker and model a chat app's message history with time-bucketed partitions, then query the latest messages per conversation.

## Check yourself

Why is deleting lots of rows in Cassandra potentially bad for read performance?

## Free resources

- [Apache Cassandra documentation](https://cassandra.apache.org/doc/latest/) (Apache)
- [ScyllaDB University](https://university.scylladb.com/) (ScyllaDB)

Previous: [Key-Value Stores and DynamoDB](https://www.internhack.in/roadmaps/tracks/backend/key-value-dynamodb) · Next: [Graph Databases with Neo4j](https://www.internhack.in/roadmaps/tracks/backend/graph-databases)

## More in Beyond Relational: NoSQL and Search

- [NoSQL Families and When to Use Them](https://www.internhack.in/roadmaps/tracks/backend/nosql-fundamentals)
- [Document Databases with MongoDB](https://www.internhack.in/roadmaps/tracks/backend/mongodb)
- [Key-Value Stores and DynamoDB](https://www.internhack.in/roadmaps/tracks/backend/key-value-dynamodb)
- [Wide-Column Stores: Cassandra and ScyllaDB](https://www.internhack.in/roadmaps/tracks/backend/cassandra-wide-column)
- [Graph Databases with Neo4j](https://www.internhack.in/roadmaps/tracks/backend/graph-databases)
- [Time-Series Databases](https://www.internhack.in/roadmaps/tracks/backend/time-series-databases)
- [Full-Text Search Fundamentals](https://www.internhack.in/roadmaps/tracks/backend/full-text-search-basics)
- [Search Engines: Elasticsearch and OpenSearch](https://www.internhack.in/roadmaps/tracks/backend/elasticsearch-opensearch)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
