Skip to main content

Module ratelimit

Module ratelimit 

Source
Expand description

Pluggable counter backends for rate-limiting plugins.

The featherbit analogue of APISIX’s policy: local | redis counter abstraction. Rate-limit plugins (limit-count, api-breaker, …) resolve a per-client key, then ask a CounterStore to count it within a fixed window. local (in-memory, per gateway instance) is always available; a Redis-backed store for cross-instance limits is planned behind a feature flag and slots in as another CounterStore implementation.

Structs§

CounterError
Counter backend failure (e.g. an unreachable Redis). Plugins decide whether to fail open (allow_degradation) or reject.
CounterStoreRegistry
Resolves a policy config value to a counter backend.
LocalCounterStore
In-memory fixed-window counters (per gateway instance).
WindowResult
Outcome of counting one request against a fixed window.

Traits§

CounterStore
A backend that counts requests per key within fixed time windows.