AI Infra Interviews logo
← AI Infrastructure System Design / 15
mediumOpenAIAnthropic

Design rate limiting for an LLM API. Why tokens instead of requests, and how does a bucket work when the cost is unknown until the end?

Divide one token budget across gateways instead of copying it. Follow output reservation and settlement, then handle grants, retries and outages without inventing extra burst capacity.

Updated Sep 2026 · Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

Divide one token budget across gateways instead of copying it. Follow output reservation and settlement, then handle grants, retries and outages without inventing extra burst capacity.

This answer is included with a free account. Sign in to read it and save your progress.

free account · no card needed
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Scored on explicit capacity assumptions, correct state and identity boundaries, failure handling and a justified design choice.

DISCUSSION · 0

No comments yet — be the first to share your approach.