2. Design a Distributed Rate Limiter
Enforce tenant quotas across servers while making burst behavior and outage policy explicit.
Pick a system. Work through the problem. Compare your approach.
Company tags are community-reported. Counts on cards show how many people reported that design.
Enforce tenant quotas across servers while making burst behavior and outage policy explicit.
Partition cached data, survive node loss and keep cache misses from overwhelming the source of truth.
A read-heavy service sends every request to a database that is slower and more expensive per read than memory, and the same few rows are asked for over and over.
A limit enforced per server is not a limit: ten servers each allowing a hundred requests a minute allow a thousand. And a counter per fixed window lets twice the limit through across a window boundary.
Collect 5 million samples a second from 500,000 hosts, store them as time series, chart them and page people.
Run 10,000 jobs a second within two seconds of their time, at least once, with retries, fairness between tenants and exactly-once effects.
Serve a product page a million times a second: a cheap query, replicas, Redis and the edge, with hot keys, stampedes and invalidation handled.
A live TV vote at a million writes a second: spread by key, buffer in Kafka, aggregate the hot counter in two stages, shed what can wait.
An in-memory data store like Redis, from one event loop to Redis Cluster to a durable platform.
Billions of files, hundreds of petabytes, one strongly consistent tree: a namespace partitioned by directory, chunk servers, replication, repair, erasure coding. One-hour boards for junior, senior and staff, with the theory behind them.