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.
Serve a product page a million times a second: a cheap query, replicas, Redis and the edge, with hot keys, stampedes and invalidation handled.
An in-memory data store like Redis, from one event loop to Redis Cluster to a durable platform.