One extra layer I’d add for long-running LLM requests is an in-flight concurrency limit. A token bucket caps arrivals, but if calls become much slower, the number running at once can still grow while the arrival rate stays within budget. For usage that isn’t known up front, reserving an upper bound and reconciling with actual usage also needs its own accounting. I’d test a slowdown and a client disconnect separately: the client going away doesn’t necessarily mean the provider stopped doing work.
Excellent points, especially the distinction between request rate and in-flight concurrency. A token bucket controls how quickly requests arrive, but it doesn’t guarantee that the backend can handle the number of requests still running when latency increases.
For LLM workloads, combining rate limits with a concurrency cap, reserving an upper bound on token usage and reconciling it against actual usage makes the protection much more robust. The client disconnect scenario is equally important because cancellation doesn’t necessarily stop the provider from processing or billing for the request.
Testing slowdowns and client disconnects separately is a great addition to the failure-testing checklist. Thanks for sharing these practical considerations!
Ziwei Yao
Manager at Tokatlas
One extra layer I’d add for long-running LLM requests is an in-flight concurrency limit. A token bucket caps arrivals, but if calls become much slower, the number running at once can still grow while the arrival rate stays within budget. For usage that isn’t known up front, reserving an upper bound and reconciling with actual usage also needs its own accounting. I’d test a slowdown and a client disconnect separately: the client going away doesn’t necessarily mean the provider stopped doing work.