---
title: "Discussion on \"Rate Limit APIs in Node.js with Redis\" | Hashnode"
description: "Discussion on \"Rate Limit APIs in Node.js with Redis\". Many times, it is required to limit an API call to put some restriction on consumption of a particular resource.\nA nice example would be rate limiting sending emails or sending OTP.\nLet's say some malicious user 🐱‍💻 is running a cURL script to gene..."
url: "https://hashnode.com/posts/rate-limit-apis-in-nodejs-with-redis/6024beb480da6c44eadf7dcb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Rate Limit APIs in Node.js with Redis](https://sujeet-agrahari.hashnode.dev/rate-limit-apis-in-nodejs-with-redis?utm_source=hashnode&utm_medium=feed)

Many times, it is required to limit an API call to put some restriction on consumption of a particular resource. A nice example would be rate limiting sending emails or sending OTP. Let's say some malicious user 🐱‍💻 is running a cURL script to gene...

Feb 11, 2021 · 4 min read · sujeet-agrahari.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#redis](https://hashnode.com/tag/redis)
-   [#apis](https://hashnode.com/tag/apis)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Sujeet Agrahari](https://hashnode.com/@sujeet-agrahari)

@sujeet-agrahari · Bengaluru, India

  
[View profile](https://hashnode.com/@sujeet-agrahari)

Building efficient backend systems, one move at a time!

A backend engineer with a passion for chess and technology. 5 years of experience in deployment and development, proficient in Docker, Kubernetes, Nginx and multiple programming languages including Java, Javascript, Python, and Node.js.

## Responses 2

Markdown supported · ⌘↵ to post

[Bhargav Ponnapalli](https://hashnode.com/@codewithbhargav)

[Feb 11, 2021](https://hashnode.com/posts/rate-limit-apis-in-nodejs-with-redis/6024beb480da6c44eadf7dcb/comment/60253b26c6d91052dafe87a6)

Good one [Sujeet Agrahari](https://hashnode.com/@sujeet-agrahari)!

I never implemented a rate limiting as a middleware on Node.js end before. I probably use Cloudflare to do it for me, but this article definitely will make me to consider using Redis sometime for this too.

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Feb 11, 2021](https://hashnode.com/posts/rate-limit-apis-in-nodejs-with-redis/6024beb480da6c44eadf7dcb/comment/6024d01a4d9e7d4dd727dd7d)

Quick, short and to the point! Nice!
