Caching half a billion user transactions
summary
A homegrown Clojure cache backs a Memcached cluster to serve ~half a billion transactions by decoupling invalidation from eviction, using logical timestamps stored persistently (initially DynamoDB, later moved off after ~$10k/month costs), protocol-buf + gzip for serialization, and a three-tier generational/local/remote design. A delay-based local cache ensures each DAG of dependent computations runs once per generation, cutting repeated 20s recomputes to milliseconds; ~600 lines across three files implement it and it works in production across ~170 EC2 instances.
AI-written summary · about
chapters (13)
- 0:00Start
- 0:33LEVEL APP + PLATFORM
- 4:59EVICTION & INVALIDATION
- 6:58NAMING
- 10:13LEVEL CACHE-DEPENDENCIES
- 13:51RACE CONDITIONS
- 16:00MEM CACHE - PROBLEMS
- 16:36CORE CACHE
- 26:33A GENERTION CACHE, WITH LOCAL AND REMOTE PROVIDERS
- 30:00WATCH YOUR DASHBOARDS
- 30:43CLOJURE PERFORMANCE
- 33:50HELLO, AGAIN
- 36:25THE FUTURE
related talks
31mSolid Cache: A disk backed Rails cache
33mWhat the Cache?!
47mCaching beyond simple put and gets
23mScaling Memcache
24mCaching Strategy for High Volume Personalized Content Requests
38mSecuring Distributed Cache: Achieving Secure-by-Default with Key Challenges &...
30mCaching patterns for lazy devs for lazy loading
38mLazy Defenses: Using Scaled TTLs to Keep Your Cache Correct
