Menu

1 / 2

Adding rate limiting to your API? A 12-point checklist so it doesn't block your own users (or your monitor)

DEV Community: backend·upordown.online·2 days ago
#CzX72ebh
#devtobackend#devto#dev#limiter#limit
Reading 0:00
15s threshold

Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — upordown.online

Rate limiting looks like a ten-minute job. Pick a number, put it in front of the API, done. Then on Monday morning a customer with 300 employees behind one office NAT gets blocked as a single "abusive client", your own mobile app retries every 429 immediately and makes things worse, and your uptime monitor starts reporting an outage that's really your own limiter.

None of that is a reason not to rate limit. It's a reason to treat the limiter like any other piece of production infrastructure. Here's the checklist I'd go through before turning one on.

Before you pick a number

1. Measure current traffic per client first

Don't guess the limit. Pull a week of access logs and compute requests per minute per key (API key, user ID or IP) at the 99th percentile and the maximum.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.