Step-by-step answer
Core 75–90 min8 stepsBuild and test a token-aware, fair limiter
The lesson's limiter made complete (a concurrency cap, three token buckets, estimate, reserve, reconcile) and a deficit-round-robin queue across firms, run against a fake rate-limited model on a virtual-time asyncio loop, so 2,000 calls of 25 seconds each simulate in about a second. The knee sits where Little's law puts it, near 89 in flight, and the fair queue cuts a small firm's worst wait from about four minutes to about two seconds.
Back to the exercise