Login   Register  
PHP Classes

Classes of Ali Khaleghi

Recommend this page to a friend!
  All class groups  >  All authors  >  Classes of Ali Khaleghi (1)  >  Mission progress status  >  Reputation  
Picture of Ali Khaleghi
Name: Ali Khaleghi <contact>
Classes: 1
Country: Norway Norway
Age: 31
All time rank: Not yet ranked
Week rank: Not yet ranked
Innovation award
Innovation award
Nominee: 1x
 
  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image AI Rate Limiter  
PHP Programming Innovation award nominee
July 2025
Number 4
Limit the access rate using multiple strategies
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.
Not yet rated by the users


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z