Forget everything counted so far.
A store that can only grow is not a store. Mostly for a test that wants a clean slate: an application calling this mid-flight is handing every caller a fresh budget.
Count one hit and say whether it may proceed.
What the budget belongs to.
How many hits the window allows.
How long the window lasts.
The verdict.
StaticcreateNames the limiter, which is what its counters are filed under.
A limiter.
Fixed-window limiter counting in this process. The zero-config default, and the right one for a single server.
It is not a limit on a function-as-a-service deployment, and that is worth saying plainly. Each instance counts on its own, so a budget of three allows three per warm container, resets on every cold start, and grants the whole budget again to every new instance. Under the traffic that warrants a limiter at all, that is no limiter. Configure a shared one there, or register your own with
limiters: [{ name, factory }].