Skip to content

Rate Limiting is hybrid version of Fixed Window Algorithm, works on public routes with IP Address and private routes with JWT, also has configurable limit-weight for every route. Can be configured from .env MongoDB-Redis cache for reducing time for authenticate user.

License

Notifications You must be signed in to change notification settings

Batur123/rate-limiting-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate Limiting Middleware

Rate Limiting is hybrid version of Fixed Window Algorithm, works on public routes with IP Address and private routes with JWT, also has configurable limit-weight for every route. Can be configured from .env
MongoDB-Redis cache for reducing time for authenticate user.

Features

Custom Limit and Weights for different routes
Limit and Weights can be used by both ip addresses and bucket tokens
MongoDB-Redis Caching for better query performance
Cluster Mode for concurrent http requests

Authenticate User Flowchart ( With Cache )

Flowchart
Note: Caching will not work if user authentication is fails so wrong authentication will be result in slower http response time.

About

Rate Limiting is hybrid version of Fixed Window Algorithm, works on public routes with IP Address and private routes with JWT, also has configurable limit-weight for every route. Can be configured from .env MongoDB-Redis cache for reducing time for authenticate user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published