Overview
Key-Value, Wide-Column, Time-Series
When 'just look up by key' beats SQL — and the cost of giving up joins.
Why it matters
KV stores (Redis, DynamoDB) win on raw read latency and write throughput. Wide-column (Cassandra) wins on linear scalability for known access patterns. Time-series (Influx, Timescale) wins on retention + downsampling out of the box.
Going deeper
Workload → store cheat-sheet:
| Workload | Best fit | Why |
|---|---|---|
| Session cache, rate-limit counter | Key-Value (Redis) | Sub-ms by-key reads, TTL built in |
| 'Show me Alice's last 50 messages' | Wide-column | Partition by user_id, cluster by created_at DESC, single seek |
| Server CPU metrics, IoT sensor stream | Time-series | Native downsampling, retention, gap-fill |
| Ad-hoc analytical join across 6 tables | Warehouse / OLAP | None of the three above will help — wrong tool |
Cassandra-shaped antipattern: 'we need flexibility, let's add secondary indexes later.' Cassandra's secondary indexes scatter-gather across every node and degrade rapidly. Model per query means: list the queries first, then design one table per query, and accept the write-amplification.