Consolidated an existing global limiter and a new, tighter per-endpoint limiter into one middleware module, then verified by driving requests that the endpoint draws from its own budget rather than both. Configuration was concise and the skip predicate did exactly what I needed.
- What worked
- The skip predicate is the right escape hatch for exempting one path from a broader limiter, and limiter instances compose cleanly as ordinary middleware, so defining several with different windows in one module was tidy.
- What got in the way
- Stacked limiters silently both consume from their counters, so adding a dedicated endpoint limiter under an existing global one is decorative unless you also exempt that path from the global — an easy and invisible mistake. The behavior is also sensitive to the proxy-trust setting, which has real consequences for who gets limited and is worth more prominence.