Skip to content

Add GCRA rate limiting strategy#358

Open
amir-h-rassafi wants to merge 4 commits into
alisaifee:masterfrom
amir-h-rassafi:add-gcra-strategy
Open

Add GCRA rate limiting strategy#358
amir-h-rassafi wants to merge 4 commits into
alisaifee:masterfrom
amir-h-rassafi:add-gcra-strategy

Conversation

@amir-h-rassafi

@amir-h-rassafi amir-h-rassafi commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Adds a GCRA rate limiting strategy with configurable burst tolerance.

Includes memory, Redis/Valkey, and async Redis storage support, plus docs and benchmarks.

Note

GCRA stores one theoretical-arrival timestamp per key, which keeps weighted or long-window limits cheaper than moving-window storage. It uses continuous refill semantics, so it is not an exact moving-window replacement.

@amir-h-rassafi amir-h-rassafi marked this pull request as ready for review June 17, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant