Open-sourced a rate-limiting middleware for owasp-opensource with token bucket and sliding window
Some background first. Our setup is owasp-opensource plus three downstream services, seven figures of daily requests, peaking around nine in the evening.
On trade-offs, my view is this: if nobody on the team owns this area long-term, do not introduce a second mechanism. With two coexistence you first have to work out which one is even in play when things break, and that costs far more than the performance you saved.
706 votes total