This package can limit the access rate using multiple strategies.
It provides a class that can take an identifier of the current user and checks if the user can access a resource of a given URL.
The class implements different access retry strategies based on access patterns to limit the access of the current user.
Currently, it supports the strategies:
- Exponential: only allows repeated accesses after a period of time that increases exponentially (back off 60s, 120s, 240s...)
- Linear: only allows repeated accesses after a period of time that increases linearly (60s, 120s, 180s...)
- Fixed: only allows repeated accesses after a period of time that is fixed (always 60s)
- Jitter: only allows repeated accesses after a period of time that increases exponentially adding random jitter (back off 60s, 120s, 240s...)
- Adaptive: only allows repeated accesses after a period of time is adapted according to patterns
The package uses Redis the data about the user accesses.
It is multi-tenant, so it supports limiting the rates of multiple users of multiple applications
It is able to detect access bursts.
The package can real-time analytics.
|