Sheet 10
Cache Architecture (Redis Cluster)
In-memory working set sizing: active user sessions, full catalog entries, hot SKUs, and shard allocations.
Cluster Memory9 GB (3 Shards)
Session Tokens RAM
2.86 GB
2M DAU × 1.5 KBCatalog Metadata
1.43 GB
500k SKUs × 3 KBHot SKUs Cache
0.10 GB
100k hot items × 1 KBWith 1.3x Overhead
5.70 GB
jemalloc + dict overheadRedis Cluster Sizing & Throughput Math
1. Peak Cache Operations / sec
Peak_RPS × QUERIES_PER_API_CALL
2. Cache Hit Operations
19,000 ops/s (95%)Cache_Ops × (CACHE_HIT_PCT / 100)
3. Primary Master Shards
MAX(3, CEIL(Ops / 100k_per_node))
4. Eviction Policy
volatile-lruvolatile-lru with explicit TTLs on session tokens