ScyllaDB

This page covers how ScyllaDB is built, how data flows through a write, how to model tables for it, and the trade-offs that decide whether it fits a workload.

ScyllaDB is a wire-compatible, drop-in-compatible rewrite of Apache Cassandra in C++ on the Seastar shared-nothing async framework. Founded in 2015 by KVM and OSv veterans, ScyllaDB delivers the same data model and CQL protocol as Cassandra but with dramatically higher per-node throughput and lower p99 latency — commonly 5–10× faster on equivalent hardware.

Key Features:

ScyllaDB vs. Cassandra:

Use Cases:


1. Shard-per-core architecture

ScyllaDB shard-per-core node Client driver shard-aware, token-aware Core 0 shard memtable, SSTables Core 1 shard memtable, SSTables Core N shard memtable, SSTables Seastar: no shared memory, message passing, async I/O

Each CPU core runs an independent shard that owns a slice of the node's token range, its own memtables, SSTables, cache and I/O queue. Cores do not share data structures or locks; when one shard needs work done by another, it sends a message. Shard-aware drivers compute which core owns a partition and connect directly to it, avoiding a cross-core hop. ScyllaDB also schedules its own I/O and CPU between foreground queries and background compaction, instead of relying on the operating system page cache and JVM garbage collector as Cassandra does.

2. Write and read path

Write path Coordinator hash partition key Replicas (RF=3) commit log + memtable Flush immutable SSTable Compaction merge, drop tombstones

The coordinator node hashes the partition key to a token and forwards the write to the replicas that own it. Each replica appends to its commit log and updates an in-memory memtable, then acknowledges. Memtables flush to immutable SSTables, and compaction merges SSTables to reclaim space and drop expired tombstones. Reads consult the row cache, then the memtable, then SSTables filtered by bloom filters. The consistency level (ONE, QUORUM, LOCAL_QUORUM, ALL) decides how many replicas must answer.

3. Data modelling example

Like Cassandra, ScyllaDB is query-first: design one table per access pattern, choose a partition key that spreads load and bounds partition size, and use clustering columns for sort order within the partition.

CREATE KEYSPACE iot WITH replication =
  {'class': 'NetworkTopologyStrategy', 'dc1': 3};

CREATE TABLE iot.readings (
  device_id text,
  day       date,
  ts        timestamp,
  temp      double,
  PRIMARY KEY ((device_id, day), ts)
) WITH CLUSTERING ORDER BY (ts DESC)
  AND default_time_to_live = 2592000;

-- Latest 10 readings for a device today: a single-partition read
SELECT ts, temp FROM iot.readings
WHERE device_id = 'd-17' AND day = '2026-10-01' LIMIT 10;
from cassandra.cluster import Cluster   # scylla-driver is API-compatible
session = Cluster(["127.0.0.1"]).connect("iot")
stmt = session.prepare("INSERT INTO readings (device_id, day, ts, temp) VALUES (?,?,?,?)")
session.execute(stmt, ("d-17", "2026-10-01", "2026-10-01 12:00:00", 21.4))

Bucketing the partition key by day keeps any single partition from growing without bound, which is the most common modelling mistake on wide-column stores.

4. When to use it

NeedScyllaDBAlternative
High write throughput, predictable low latency at scaleStrong fitCassandra
Ad-hoc joins and analyticsPoor fitPostgreSQL, a warehouse
Multi-row ACID transactionsLightweight transactions onlyRelational DB, FoundationDB
DynamoDB-compatible APIAlternatorDynamoDB

Operationally, ScyllaDB clusters are usually sized by cores and disk rather than by heap tuning, since there is no JVM. It ships tooling for repair, backup and monitoring (Scylla Manager and a Prometheus/Grafana stack), and repairs still need to run regularly so that replicas converge after node outages. Because it is wire-compatible with Cassandra, existing CQL drivers, tools such as cqlsh, and data models generally move over without changes, which makes a proof of concept cheap to run against real traffic.

5. Pitfalls