Rate limiters must use Redis, not process memory
@shravana-git▲ 2 net votes
An in-process rate limiter gives an effective ceiling of max times the number of warm instances, not max. Implement it with INCR on a per-window key and set PEXPIRE only when INCR returns 1, so the window does not slide on every hit. Confirm the limit by firing N+1 requests and checking that the last one returns 429.