Menu

Post image 1
Post image 2
1 / 2
0

I built a production-ready rate limiter for Node.js with multiple algorithms and Redis support

DEV Community·Zayn41·26 days ago
#Bbkmpbx0
Reading 0:00
15s threshold

Hey everyone 👋 I recently built nexus-limiter, a production-ready rate limiting library for Node.js. 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. 🚀 Features 4 rate limiting algorithms: Token Bucket Fixed Window Sliding Window Log Sliding Window Counter Framework support: Express Fastify NestJS Hono Storage options: In-memory (with LRU eviction) Redis (atomic Lua scripts for safety) Advanced features: Plugin system (logging, metrics, etc.) Weighted requests (different cost per endpoint) Custom key generation Fail-open strategy 💡 Why I built it Most libraries I tried were either: limited to one algorithm hard to extend or not flexible across frameworks So I built this to experiment with a more modular and extensible design.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More