Skip to content
Log in

Rate Limiting Design

Decides what happens to the rejected request, since a 429 with no guidance produces a client that retries into the wall.

0

Share this prompt

Free — no card needed

Create a free account

to open Rate Limiting Design — and the other 364 prompts across 21 categories.

We store your email address to send these. We never sell it or pass it to advertisers. Withdraw at any time. Privacy Policy.

Already have an account?

CategoryCodingForDevelopers, OperatorsTested onClaudeChatGPT

Running it, start to finish

  1. Decide what you are protecting against — the four cases need different limits.
  2. Measure legitimate peak usage before choosing numbers.
  3. 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

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.