<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zayn41</title>
    <description>The latest articles on DEV Community by Zayn41 (@zayn41).</description>
    <link>https://dev.to/zayn41</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3917687%2Fb53b72aa-1192-48d0-bcb7-25b62692d91b.png</url>
      <title>DEV Community: Zayn41</title>
      <link>https://dev.to/zayn41</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zayn41"/>
    <language>en</language>
    <item>
      <title>I built a production-ready rate limiter for Node.js with multiple algorithms and Redis support</title>
      <dc:creator>Zayn41</dc:creator>
      <pubDate>Thu, 07 May 2026 10:40:59 +0000</pubDate>
      <link>https://dev.to/zayn41/i-built-a-production-ready-rate-limiter-for-nodejs-with-multiple-algorithms-and-redis-support-4h86</link>
      <guid>https://dev.to/zayn41/i-built-a-production-ready-rate-limiter-for-nodejs-with-multiple-algorithms-and-redis-support-4h86</guid>
      <description>&lt;p&gt;Hey everyone 👋&lt;/p&gt;

&lt;p&gt;I recently built nexus-limiter, a production-ready rate limiting library for Node.js.&lt;/p&gt;

&lt;p&gt;This started as a learning project to understand how different rate limiting algorithms work internally, and grew into a fully usable library with multiple frameworks and storage backends.&lt;/p&gt;

&lt;p&gt;🚀 Features&lt;br&gt;
4 rate limiting algorithms:&lt;br&gt;
Token Bucket&lt;br&gt;
Fixed Window&lt;br&gt;
Sliding Window Log&lt;br&gt;
Sliding Window Counter&lt;br&gt;
Framework support:&lt;br&gt;
Express&lt;br&gt;
Fastify&lt;br&gt;
NestJS&lt;br&gt;
Hono&lt;br&gt;
Storage options:&lt;br&gt;
In-memory (with LRU eviction)&lt;br&gt;
Redis (atomic Lua scripts for safety)&lt;br&gt;
Advanced features:&lt;br&gt;
Plugin system (logging, metrics, etc.)&lt;br&gt;
Weighted requests (different cost per endpoint)&lt;br&gt;
Custom key generation&lt;br&gt;
Fail-open strategy&lt;br&gt;
💡 Why I built it&lt;/p&gt;

&lt;p&gt;Most libraries I tried were either:&lt;/p&gt;

&lt;p&gt;limited to one algorithm&lt;br&gt;
hard to extend&lt;br&gt;
or not flexible across frameworks&lt;/p&gt;

&lt;p&gt;So I built this to experiment with a more modular and extensible design.&lt;/p&gt;

&lt;p&gt;🔗 Links&lt;br&gt;
npm: &lt;a href="https://www.npmjs.com/package/nexus-limiter" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/nexus-limiter&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Zayn41/rate-limiter" rel="noopener noreferrer"&gt;https://github.com/Zayn41/rate-limiter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to hear feedback, suggestions, or real-world edge cases I might have missed 🙌&lt;/p&gt;

</description>
      <category>node</category>
      <category>typescript</category>
      <category>backend</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
