Skip to content

Alternative limiter #38

@ncr

Description

@ncr

I think the limiter uses expire incorrectly on the Redis hashes. In my observation, the limiter works for some time but when it wraps around the bucket_span, it blocks until the expire takes place on the whole limiter hash.

Here's a similar implementation that operates on invidual keys:
https://gist.github.com/ncr/c2b1b62a8d2b636daca1dff12b457a31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions