What the carrier saw
ParcelMint is a shipping marketplace. Merchants price labels through GET /v1/quotes before checkout; about 4,800 integrations call it, and each API key is promised 10 requests per 10-second window.
During a carrier sale, one merchant sent a burst through the load balancer. ParcelMint runs three API instances, and each one enforced the promise from its own memory, so that merchant got far more than 10 requests through in a single window. The carrier's quotation service throttled us, 8.4% of customers couldn't buy a label, and the carrier asked us to cut traffic until the afternoon.
What you're changing
The quota belongs to the key, whichever instance happens to take the request. A caller who is over the limit should be told how long to wait.
What the starter gives you
The quotes API (Python, with the redis client already in its requirements) running as three instances on ports 8091, 8092 and 8093, and a Redis they can all reach. Each instance counts requests in its own memory. make up starts it all.
make load sends 30 requests for one key, one at a time, round-robin across the three instances, and prints how many got through. make burst sends 60 at the same moment, 20 to each instance. make retry plays a well-behaved client: it fills a key across the three instances, reads the 429's Retry-After if there is one, waits that long and tries again. make contract checks the API still answers as it did. Run make load before you change anything.
You can port the service to another language: keep its routes, port 8080 inside the container, INSTANCE_ID and REDIS_URL, and run make contract until it passes.
Four questions stay open for your README: what quotes do while Redis is unreachable, whose clock defines the window, managed Redis failover and quota administration.