Archive
redis
-
Cache stampedes, and the Lock component doing the boring part
A Redis failover cost us four minutes of 9 second p99 because the lock I hand rolled in 2019 had two bugs. Replacing it with the Cache Contracts and the Lock component deleted 210 lines.
-
Redis in front of a report that was still slow
Caching a nine second aggregate report cut the median to 81 milliseconds and pushed the p99 to nearly fifteen seconds, because every expiry started a stampede. What the lock, the stale copy and the cache keys look like now.