Step-by-step answer
Stretch 60 min7 stepsAdaptive concurrency under a moving limit
The token-aware limiter with a concurrency cap that a controller moves, three controllers (a static cap of 90, AIMD on 429s and 529s, and a TTFT-gradient controller after Netflix's Gradient2), and a fake provider that halves its OTPM limit for five minutes and later triples TTFT while shedding load with 529s. AIMD is the one that reacts to the limit drop, the gradient controller the one that reacts to the slowdown, and the trade-offs show up as 429 and 529 counts against backlog and recovery time.
Back to the exercise