Redis
8 posts
Design Problem: Flash Sale Ticketing, and How Much Each Layer Must Turn Away When 500,000 People Chase 10,000 Seats
System Design series Part 9-4: the intro's sign-ups as a flash sale. CDN, waiting room, Redis reservation, async writes cut load; the DB stops overselling. Threat model.
Design Problem: A Leaderboard, with Ranks for Ten Million Members, Who Comes First in a Tie, and Time Decay for Trending Talks
System Design series Part 9-6: a weekly leaderboard for 10M members on a Redis sorted set, first-to-reach tie-breaks, a rebuildable ledger, and decaying trending talks.
Design Problem: A News Feed, Push vs Pull, and the Celebrity Problem
System Design series Part 9-2: push vs pull costs for a speaker feed, a hybrid for celebrities, timeline storage, cursor paging, visibility checks, and a threat model.
Bloom Filters and HyperLogLog: Trading a Little Error for a Lot of Memory, and What to Do When Someone Games the Estimate
System Design series Part 3-6: Bloom filter error vs capacity, HyperLogLog error and merging, cache penetration, unique visitors, and count inflation via a public hash.
Caching in Depth: Hit Ratio Math, Write-Order Races, Penetration, Breakdown, Avalanche, and Multi-Level Caches
System Design series Part 2-3: hit ratio math, cache-aside write races, penetration, breakdown, avalanche, hot keys, multi-level caches, and evict-after-commit in Spring.
Distributed Locks and Fencing Tokens: The Lock Expires, and the Holder Does Not Know
System Design series Part 4-7: why lease locks fail in GC pauses and failover; Redis, Redlock, databases, etcd compared; fencing tokens and idempotency keys for payouts.
Geohash and Geospatial Indexes: Cell Boundaries in Nearby Search, Redis GEO, and How Distance Leaks Location
System Design series Part 3-8: Geohash makes coordinates searchable by a B+Tree; cell boundaries, 9-cell queries, Redis GEO vs MySQL SPATIAL vs H3, and trilateration.
Rate Limiting: Algorithms, Distributed Rate Limiting, and How It Differs from Load Shedding
System Design series Part 6-4: fixed window, sliding window, and token bucket compared, distributed limits, keys and 429s, versus load shedding, and a Redis Lua script.