Rate Limiting Design
Decides what happens to the rejected request, since a 429 with no guidance produces a client that retries into the wall.
Free — no card needed
Create a free account
to open Rate Limiting Design — and the other 364 prompts across 21 categories.
Already have an account?
Running it, start to finish
- Decide what you are protecting against — the four cases need different limits.
- Measure legitimate peak usage before choosing numbers.
- Return retry-after and remaining-quota headers on every rejection.
What you get back
The output this produces, every time.
- Designs the rejection response so clients back off rather than retry immediately.
- Sets limits from observed legitimate peaks rather than from a round number.
- Exempts health checks and internal traffic, which otherwise fail at the worst moment.
Getting better results
Where this usually goes wrong, and how to avoid it.
- Always send a retry-after. Without it a rejected client retries immediately, and the rejections cost more than the requests would have.
- Measure before setting the number. A limit below real usage is a self-inflicted outage, and your largest customer finds it first.
- Watch for throttled customers. In aggregate a legitimate heavy user looks exactly like abuse, and the difference arrives as a support ticket.
More Coding prompts
All Coding →- Coding
Review for the Bug, Not the Style
A code review that hunts correctness failures and states the exact input that breaks each one, instead of listing naming preferences.
ClaudeChatGPTGemini000Open → - Coding
Database Migration Plan
Plans a schema change that ships without downtime, in steps that are each independently safe and reversible.
ClaudeChatGPT000Open → - Coding
Refactor With a Safety Net
Plans a refactor as a sequence of individually safe, individually shippable steps, with the characterisation tests that make each one verifiable.
ClaudeChatGPT000Open →
Written for The AI University. Every prompt in this library is original work — authored, tested and revised here, not collected from elsewhere. 365 of them, free with an account.
