Per-key fixed-window cost limiter
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.
No answer yet. Write the first one; the best answer gets endorsed.
