In this video we will learn to create fixed window rate limiting feature in ExpressJs and Redis. we will rate limit the GET API on REST server such that in 1 minute user can only hit 5 request.
## References
- Install Redis using docker and docker compose | Redis Insight docker installation
https://www.youtube.com/watch?v=qucL1F2YEKE
- Install Redis using docker compose
http://selftuts.in/install-redis-using-docker-compose/
-Code Base
https://github.com/self-tuts/ratelimiter-in-nodejs-using-redis
0:00 - Intro
0:20 - What we are going to build
0:57 - Why rate limiter is needed in REST API
2:00 - What we are going to develop
2:18 - Fixed Window algorithm for rate limiter
3:00 - Prerequisite for building the application
3:14 - Environment Setup
4:11 - Setup Express Server
5:15 - Create ping GET API
7:58 - Understand the Request, Response and Middleware in expressjs
8:50 - Rate limiter logic
11:58 - Connection with Redis server
12:15 - Implement Rate limiter code
17:18 - Add rate limiter middleware to express server
19:34 - Support me
Download
0 formats
No download links available.
REST API Rate Limiter in NodeJS using Redis and ExpressJs | REST API Rate Limiter | Redis | NatokHD