Wide-Column Store Data Model and LSM-Tree Storage
LSM-Tree Storage Engine
Wide-column stores use LSM-Trees (Log-Structured Merge-Trees), optimized for write-heavy workloads. Writes append to an in-memory buffer called the memtable (1-3ms latency) rather than updating files in place. A write-ahead log ensures durability. When full (64-256MB), the memtable flushes to disk as an immutable SSTable (Sorted String Table). These files never change once written.
Read Path Mechanics
Reads check memtable first, then each SSTable from newest to oldest. To avoid scanning every file, each SSTable has a bloom filter (a probabilistic structure answering "definitely not" or "possibly yes" with 1% false positives). A read checks 3-7 bloom filters in 1-3us each, only reading relevant files. Hot data in cache yields sub-ms reads; cold data needs disk seeks (100us SSD).
Scale and Access Patterns
Clustering columns enable efficient range scans within a partition. Store an activity feed with partition key user_id and clustering column timestamp DESC: fetching 50 recent activities is one sequential read. Keep partitions under 100-200MB compressed for predictable latency.
The tradeoff: every query requires partition key. Cross-partition queries scatter to all nodes with unbounded latency. Joins are impossible. Design tables around access patterns, not entities.