3 ms·
You're being downvoted but there is some truth to this. For example, I inherited a relatively poorly performing service with a per-user limit set to 60 req/min
by quacker 10y ago
You're being downvoted but there is some truth to this.
For example, I inherited a relatively poorly performing service with a per-user limit set to 60 req/min. As the service operator, I have the choice of setting either a rate limit of 60 req/min or 1 req/sec. The former (60/min) leaves you open to per-user spikes of up to 60 req/sec. This is a real risk: 10 users together _could_ produce a spike of 600 req/sec.
Still, we went with the per-minute rate limit. Why? Those multi-user bursts are fairly improbable (most of our users were well-behaving) and queueing let us manage these isolated spikes gracefully. The per-minute rate limit is a bit more flexible from a user perspective (reward the good users) and it still combats the problem of sustained heavy load on the service, which is the true danger (stop/limit the "bad" users).
- user5994461 10y agoIt was not talking about the rate limit but the performance of the applications. Performances must never be accounted in request/min. It's only requests/s that matter, because your performances are defined by the peak load you can take (which is many times the minute average). Limits should be on more than a few seconds to support short peaks, yet throttle quickly if they persist.