paisable
paisable copied to clipboard
enhancement: Implementing Rate Limiting Using Rate-Limiter-Flexible
Enhancement: Implementing Rate Limiting Using Rate-Limiter-Flexible
Description
This enhancement implements rate limiting across sensitive and public API routes using rate-limiter-flexible.
The goal is to protect the APIs against brute-force attacks and DDoS attempts, ensuring stability and security of the server.
Why Rate-Limiter-Flexible Over express-rate-limit
- Flexible algorithms: Unlike
express-rate-limitwhich primarily uses fixed-window counters,rate-limiter-flexiblesupports fixed window, sliding window, and token bucket algorithms, allowing more accurate and fair limiting. - Better scaling: Provides support for in-memory, Redis, and other stores, making it suitable for production-grade distributed environments.
- Customizable behavior: Allows per-route configuration and custom response handling when limits are exceeded.
Advantages
- Protects against brute-force attacks on sensitive routes.
- Mitigates DDoS-style abuse for public APIs.
@archa8 @Avdhesh-Varshney Bro, could you please add the label here? Thanks!