Stone.js API
    Preparing search index...

    Per-process fixed-window limiter. The zero-config default, and the right one for a single server.

    Wrong for a function-as-a-service deployment, and worth saying plainly: each cold instance keeps its own counters, so every new instance grants the full budget again, which is no limit at all under the traffic that warrants one. Configure a shared driver there.

    Implements

    Index
    • Count one hit and say whether it may proceed.

      Parameters

      • key: string

        What the budget belongs to.

      • limit: number

        How many hits the window allows.

      • windowMs: number

        How long the window lasts.

      Returns Promise<RateLimitHit>

      The verdict.