Back to Browse

Rate Limiting using NodeJs, MongoDB, Redis, Docker (Token Bucket, Leaky Bucket)

6 views
Nov 18, 2025
13:13

Rate Limiting in Node.js | Token Bucket & Leaky Bucket Demo In this video, I demonstrate how to implement robust rate-limiting strategies in a Node.js REST API. Rate limiting is essential for protecting APIs from abuse, ensuring fair usage, and maintaining performance. 🔹 Project Highlights: Built with TypeScript + Express.js MongoDB to persist user Redis for rate limit data, tracking of requests Implements both Token Bucket and Leaky Bucket algorithms Fully containerized with Docker, ready for deployment 💡 API Endpoints: GET / — Simple test endpoint GET /token-bucket — Rate-limited via Token Bucket GET /leaky-bucket — Rate-limited via Leaky Bucket Each route is protected via middleware, allowing you to easily switch between algorithms depending on your requirements. 🔧 Why it matters: Rate limiting protects your API from abuse (like DDoS attacks or brute-force attempts), ensures fair usage, and maintains consistent performance—especially at scale. 📦 Check out the code on GitHub: https://github.com/abhradippaul/Rate-Limiting GitHub:- https://github.com/abhradippaul LinkedIn:- https://www.linkedin.com/in/abhradip-paul

Download

0 formats

No download links available.

Rate Limiting using NodeJs, MongoDB, Redis, Docker (Token Bucket, Leaky Bucket) | NatokHD