# ScyllaDB — NoSQL Data Store Compatible with Cassandra > ScyllaDB is a high-performance NoSQL database built on the Seastar framework. Drop-in compatible with Apache Cassandra and Amazon DynamoDB APIs but 10x faster thanks to its shard-per-core, shared-nothing architecture written in C++. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash # Docker (single node) docker run -d --name scylla -p 9042:9042 scylladb/scylla:latest \ --smp 2 --memory 2G --overprovisioned 1 # CQL shell docker exec -it scylla cqlsh ``` CQL (Cassandra Query Language — fully compatible): ```sql CREATE KEYSPACE tokrepo WITH replication = { "class": "NetworkTopologyStrategy", "datacenter1": 3 }; USE tokrepo; CREATE TABLE assets ( id uuid PRIMARY KEY, repo text, stars int, tags set, created_at timestamp ); INSERT INTO assets (id, repo, stars, tags, created_at) VALUES (uuid(), "react", 230000, { "frontend", "ui" }, toTimestamp(now())); SELECT * FROM assets; SELECT * FROM assets WHERE stars > 100000 ALLOW FILTERING; CREATE INDEX ON assets (repo); ``` ## Intro ScyllaDB is a distributed, wide-column NoSQL database that is drop-in compatible with Apache Cassandra (CQL protocol) and Amazon DynamoDB (via Scylla Alternator), but delivers 10x the throughput. Written in C++ on the Seastar framework with a shard-per-core, shared-nothing architecture and userspace network stack. Used at Discord, Expedia, Comcast, and Epic Games. - **Repo**: https://github.com/scylladb/scylladb - **Stars**: 15K+ - **Language**: C++ - **License**: AGPLv3 (Open Source) / commercial (Enterprise) ## What ScyllaDB Does - **CQL compatibility** — drop-in for Cassandra - **DynamoDB compatibility** — via Alternator - **Shard-per-core** — one thread per CPU core, no lock contention - **User-space I/O** — bypass kernel for networking and storage - **Workload prioritization** — classify and prioritize queries - **Incremental compaction** — avoid disk space amplification - **Materialized views** — auto-maintained denormalized tables - **LWT (lightweight transactions)** — Paxos-based linearizable operations - **Change Data Capture** — stream CDC events ## Architecture Built on Seastar (userspace C++ framework). Each CPU core owns a shard of data with no shared state — eliminating lock contention and context switching. Userspace TCP stack (DPDK optional) and direct I/O to disk. ## Self-Hosting ```yaml # 3-node cluster version: "3" services: scylla-node1: image: scylladb/scylla:latest command: --seeds=scylla-node1 --smp 4 --memory 8G scylla-node2: image: scylladb/scylla:latest command: --seeds=scylla-node1 --smp 4 --memory 8G scylla-node3: image: scylladb/scylla:latest command: --seeds=scylla-node1 --smp 4 --memory 8G ``` ## Key Features - Cassandra + DynamoDB wire compatibility - Shard-per-core architecture - Sub-millisecond P99 latency - Linear scaling - Workload prioritization - Incremental compaction - Materialized views - Change Data Capture - ScyllaDB Manager for ops - ScyllaDB Monitoring Stack ## Comparison | Database | Protocol | Architecture | Language | |---|---|---|---| | ScyllaDB | CQL + DynamoDB | Shard-per-core | C++ | | Cassandra | CQL | JVM threads | Java | | DynamoDB | DynamoDB API | Managed | Proprietary | | HBase | Custom | Region servers | Java | | Redis Cluster | RESP | Shard per node | C | ## FAQ **Q: Is it really 10x faster than Cassandra?** A: Yes under specific benchmarks. Key differences: C++ without GC, shard-per-core lock-free design, and userspace I/O. Actual gains depend on your workload. **Q: Is migrating from Cassandra hard?** A: No. The CQL protocol and drivers are compatible, and the data format is the same. Most projects can migrate in a few hours. **Q: AGPLv3 restrictions?** A: If you modify the source and offer it as a network service, you must open source your modifications. Self-use and embedding in applications are not affected. The commercial edition includes professional support and enterprise features. ## Sources - Docs: https://docs.scylladb.com - GitHub: https://github.com/scylladb/scylladb - License: AGPLv3 --- Source: https://tokrepo.com/en/workflows/scylladb-nosql-data-store-compatible-cassandra-0114254d Author: AI Open Source