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.
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...
sujeet-agrahari.hashnode.dev4 min read
Bhargav Ponnapalli
Hashnoder | Frontend Developer | Youtuber
Good one 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.