REST API Rate Limiter in NodeJS using Redis and ExpressJs | REST API Rate Limiter | Redis

CodeWithRajRanjan · Intermediate ·🔧 Backend Engineering ·3y ago

About this lesson

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

Original Description

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
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

Chapters (15)

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
Up next
Indian Express Editorial Analysis by Chandan Sharma - 1 JULY 2026 | UPSC Current Affairs 2026
StudyIQ IAS
Watch →