Skip to content
SparkTime, home

Tagged #Redis

GuideTechnology

19 min read

Design a Distributed Rate Limiter

Design a rate limiter that enforces limits across many API servers: requirements, estimates, where the limiter sits, token bucket, leaky bucket, fixed window, sliding log and sliding window counter algorithms with a runnable comparison, atomic Redis implementations, local plus global hybrids, failure behaviour (fail open or fail closed), multi-region limits and response headers.

GuideTechnology

16 min read

Distributed Locks, Leases, Leader Election and Consensus

When only one node may do something at a time: when you actually need a distributed lock and when you do not, locks for efficiency versus correctness, leases and why they need fencing tokens, Redis and database locks and their limits, leader election, and consensus (Raft, majorities, ZooKeeper and etcd) explained at interview depth.

GuideTechnology

20 min read

Caching in System Design: Patterns, Invalidation, Eviction and Redis

Caching as a design decision: where caches live, hit ratios, cache-aside, read-through, write-through and write-back, TTLs and invalidation, LRU and other eviction policies, cache stampedes, hot keys, negative caching and distributed caches such as Redis, with the trade-off between faster reads, stale data and invalidation complexity.