Per-key fixed-window cost limiter

0
Remix

Build a rate limiter that meters cost rather than request count. Each key may spend at most limit units in each fixed window of window seconds, with windows aligned to multiples of window. Process commands: ALLOW key cost t answers whether the request fits (and records it if so), and RESET key clears that key's usage.

xAICodingLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.