High Volume Ratelimiting with Redis
summary
Handles C10K average traffic by using Redis as the central store and per-app local memory to absorb bursts, implementing access-token based rate limits with a 30-minute TTL and optimistic merge/sync to avoid hot spots. Uses Redis sorted sets to keep the top 2,000 users and sharding (about 4,000 buckets mentioned) to spread writes, accepts occasional false positives for performance, and relies on Lua scripts for atomic merge/compare-and-set operations.
AI-written summary · about
chapters (8)
- 0:00Introduction to ratelimiting challenges
- 4:23Problems with existing ratelimiting
- 10:15Redis for high-volume ratelimiting
- 17:40Synchronizing access tokens across servers
- 24:16Optimistic lock and concurrency control
- 31:08Trade-offs in consistency and performance
- 36:45Sharding and data distribution
- 40:34Q&A and conclusion
related talks
26mRate limiting/monitoring with Redis
33mIntroduction to Redis
51mX-Raying Your Redis App: SDK Tuning with a Performance Engineer’s Eye
46mFun with Ruby and Redis
27mBehind the Keys: Redis Oyster Cult
59mUsing Redis beyond caching
50mRate Limiting in Node js applications
10mRedis, databaza në memorie me shumë përdorime
