paisable icon indicating copy to clipboard operation
paisable copied to clipboard

enhancement: Implementing Rate Limiting Using Rate-Limiter-Flexible

Open 100NikhilBro opened this issue 1 year ago • 1 comments

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-limit which primarily uses fixed-window counters, rate-limiter-flexible supports 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.

100NikhilBro avatar Oct 09 '25 22:10 100NikhilBro

@archa8 @Avdhesh-Varshney Bro, could you please add the label here? Thanks!

100NikhilBro avatar Oct 09 '25 22:10 100NikhilBro