One decision. One atomic operation.
Lua-backed updates keep concurrent requests from slipping through the same opening.
A focused rate-limiting library with three proven algorithms, atomic Redis coordination, and one API that stays out of your framework.
npm i limixuser_72a14msallowtenant_orbit3msallowapi_91bd2mslimitNo middleware lock-in and no sprawling configuration surface. Create a limiter, choose where its state lives, and consume against any identifier that matters to your application.
It ships with types and has no framework opinions.
$ npm install limiximport { Algorithms, createRateLimiter, MemoryStore,} from 'limix';
const limiter = createRateLimiter({ algorithm: Algorithms.FIXED_WINDOW, limit: 100, windowMs: 60_000, store: new MemoryStore(),});
const decision = await limiter.consume('user_42');
if (!decision.allowed) { // Return 429, delay the job, or apply your own policy.}The package returns the decision and useful limit metadata. Your transport layer decides what happens next.
Lua-backed updates keep concurrent requests from slipping through the same opening.
Use the same limiter in Express, workers, queues, cron jobs, or plain Node.
Rate limiting is a traffic-shaping decision, not a checkbox. Use the lab to get a feel for how each strategy responds to the same uneven stream.
Cheap, direct, and excellent when a boundary burst is acceptable.
Read the guide →02 · balancedSmoother enforcement around boundaries without storing every request.
Read the guide →03Built for controlled bursts with capacity that replenishes over time.
Read the guide →Use the memory store for development, tests, and single-process workloads. Move to Redis when several application instances must agree on the same limit.
Tests, scripts, and a single application process.
Local onlyNo infrastructure →Production APIs, workers, and multiple instances.
Shared stateBring Redis →