rate-limiter-flexible
A strong pick. 5th of 10 web security libraries.
rate-limiter-flexible is a zero-dependency rate limiter that works with any framework. It counts requests in memory or in more than ten shared stores, from Redis and Valkey to Postgres, Prisma and DynamoDB. For distributed or unusual rate limiting it is a strong, actively maintained pick today. For a plain Express app, express-rate-limit is simpler and is chosen more often.
Best for: Backend teams that need atomic rate limits shared across servers, a database store other than Redis, or limits outside Express.
Scores
Overall7.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is the best open-source choice when rate limits must be shared across servers, kept in a database other than Redis, or tuned in detail. It is well built and actively maintained. For a typical Express app, express-rate-limit is easier, more widely chosen and growing faster, so this is not the category default. One main maintainer and slower-than-median growth keep it below 8.
- npm-compare.com/express-brute,express-rate-limit,express-slow-down,rate-limiter-flexible: express-rate-limit for standard apps, rate-limiter-flexible for advanced needs
- npm downloads ratio: 3.4 against a 4.1 median
- github releasesLastYear: 21 releases in the last year
- github.com/animir/node-rate-limiter-flexible: Wide feature set and many stores, with no dependencies
GPT-6.2 Sol: 7.7, likely 6.6 to 8.7
This is a strong choice for new Node.js services that need shared counters and custom quotas on infrastructure they already run. For routine Express limits, express-rate-limit is easier to integrate and has much broader tracked adoption. Active releases support the recommendation, while concentrated release ownership and below-baseline download growth lower confidence in the longer-term outlook.
- github.com/animir/node-rate-limiter-flexible/blob/v11.5.0/CONTEXT.md: Shared stores and composable quota controls support custom integrations.
- express-rate-limit.mintlify.app/quickstart/usage: Express middleware includes configurable rate-limit headers and IP handling.
- github.com/animir/node-rate-limiter-flexible/releases: Recent releases include adapter fixes and new blocking controls.
- npmjs.com/package/rate-limiter-flexible?activeTab=code: Single listed npm collaborator.
- dependents repos, peers express-rate-limit, npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Smaller tracked footprint than express-rate-limit and below-baseline growth.
Needed by many5.4
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many developers who build server-side APIs need rate limiting, but it covers only one of the category's three jobs. The library works with any framework and runs on Node and Deno, and its memory limiter also runs in the browser. Its focus on stores and fine control speaks most to teams with several servers.
- github.com/animir/node-rate-limiter-flexible: Works with any framework, has Express, Koa, Hapi and NestJS examples, and supports Deno
- npm-compare.com/express-brute,express-rate-limit,express-slow-down,rate-limiter-flexible: Calls it the power user choice for limits shared across services
GPT-6.2 Sol: 5.8, likely 4.5 to 7.0
Application-level rate limiting serves a large group of web and API developers, especially those protecting logins or enforcing customer quotas. The API works across frameworks, and shared counters are most useful to teams running multiple server instances. The developer survey measures backend framework use, so the share of teams that need application-level limits is an estimate.
- 2025.stateofjs.com/en-US/libraries/back-end-frameworks: Survey shows broad use of JavaScript backend frameworks.
- github.com/animir/node-rate-limiter-flexible/blob/v11.5.0/CONTEXT.md: Documents framework-independent quotas and local and distributed stores.
Helps a lot8.2
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It is the most complete open-source rate limiter for Node. It uses atomic increments, supports many stores, and has bursty, union and queue limiters, insurance failover and in-memory blocking during floods. It bundles TypeScript types and its wiki documents each store. It loses points for the low-level API, which needs your own middleware code, and for fixed windows only. Recent releases also still fix race conditions in some stores.
- github.com/animir/node-rate-limiter-flexible: Lists the features, more than ten stores and bundled types
- github.com/animir/node-rate-limiter-flexible/releases: v11.4.0 made Prisma and Drizzle upserts atomic; before, concurrent requests could get past the limit
- socket.dev/npm/package/rate-limiter-flexible: Says it uses fixed windows for speed and needs the Redis offline queue turned off
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.3, likely 7.1 to 9.2
Version 11.5.0 combines atomic fixed-window counters with weighted quotas, blocking, and configurable fallback across several stores. Bundled types and the versioned reference help developers and coding agents with setup, although the Express wiki example treats every rejection as a quota error. Hitlimit's in-memory benchmark puts it ahead of express-rate-limit and behind hitlimit, with limited evidence about performance across current distributed adapters.
- github.com/animir/node-rate-limiter-flexible/blob/v11.5.0/CONTEXT.md: Versioned API reference covers types, store options, and error handling.
- github.com/animir/node-rate-limiter-flexible/releases/tag/v11.5.0: Latest release documents subsecond rounding for three stores.
- github.com/animir/node-rate-limiter-flexible/wiki/Express-Middleware: Express example returns HTTP 429 for any rejection.
- github.com/firecrawl/firecrawl/issues/3728: Firecrawl reported the same integration mistake on an older major.
- hitlimit.jointops.dev/docs/benchmarks: Competing maintainer's benchmark compares in-memory throughput.
Holds up over time7.2
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
The project has been active for eight years. It had 123 commits and 21 releases in the last year, the latest on 2026-11-15, and only 6 issues are open. Releases mostly come from one maintainer, and no funding is visible. That is the main risk to the next two years. Minor releases do not mark breaking changes, but v11.4.0 changed how duration 0 works for some stores.
- github commitsLastYear / releasesLastYear: 123 commits and 21 releases in the last year
- github openIssues / closedIssues: 6 issues open and 220 closed
- github.com/animir/node-rate-limiter-flexible/releases: Frequent small releases in Oct–Nov 2026
- scorecard Code-Review: Score 2: few changes get a second reviewer
GPT-6.2 Sol: 7.3, likely 6.0 to 8.5
The project shipped 21 releases and made 123 commits in the last year, and the maintainer responded to a wrapper regression the day it was reported. Versions 10 and 11 changed constructor requirements and wrapper inheritance, which adds upgrade work. External contributors land fixes, but npm lists one collaborator and the funding file points to donations, leaving the project's long-term staffing uncertain.
- github commitsLastYear, releasesLastYear, contributors: 123 commits, 21 releases, and 67 contributors.
- github.com/animir/node-rate-limiter-flexible/issues/356: Same-day maintainer response and initial fix for the wrapper report.
- github.com/animir/node-rate-limiter-flexible/releases/tag/v10.0.0: Version 10 made points and duration explicit requirements.
- github.com/animir/node-rate-limiter-flexible/releases/tag/v11.0.0: Version 11 changed wrapper inheritance and compatibility.
- npmjs.com/package/rate-limiter-flexible?activeTab=code: npm lists one collaborator.
- github.com/animir/node-rate-limiter-flexible/blob/master/.github/FUNDING.yml: Repository funding file links to Ko-fi.
Used widely4.4
How many use it, and is that growing?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It had 18.8M downloads in the last 4 weeks, against 5.5M a year before. That ratio of 3.4 is below the 4.1 median, so it is losing ground. Its 3,010 dependent repositories are about a ninth of express-rate-limit's 27,591, but more than Upstash Ratelimit's 2,053. Part of the downloads come from other tools that install it, so direct choices are probably in the tens of thousands of projects.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 18.76M against 5.52M, a ratio of 3.4, below the 4.1 median
- dependents repos: 3,010 repositories and 170 packages depend on it
- peers express-rate-limit: 388M downloads, growing 10x a year, with 27,591 dependent repositories
- github stars: 3,604 stars, slightly more than express-rate-limit
GPT-6.2 Sol: 3.8, likely 2.8 to 5.1
ecosyste.ms found 3,010 dependent repositories, ahead of Upstash Ratelimit's 2,053 and well behind express-rate-limit's 27,591. Four-week npm downloads rose from 5.52 million to 18.76 million, or 3.40×, below the catalog's 4.10× baseline and both rate-limiting peers. The library is losing ground on that measure, and partial repository coverage and repeat installs make the number of teams choosing it uncertain.
- dependents repos, packages: 3,010 tracked repositories and 170 tracked packages.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 3.40× year-over-year growth versus the 4.10× baseline.
- peers express-rate-limit, Upstash Ratelimit: Both peers grew much faster on npm.
- github stars, hackerNews stories, bluesky posts: 3,604 stars and no matching posts in either collector.
Vouched for6.1
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 3.0 to 6.0
Comparison sites recommend it for distributed rate limiting, and the Socket.IO docs point to it for limiting events. No survey covers it, no independent benchmark exists, and there are no Hacker News or Bluesky posts about it. Its own benchmarks are run by the author, so they count for little.
- npm-compare.com/express-brute,express-rate-limit,express-slow-down,rate-limiter-flexible: Independent comparison that recommends it for advanced cases
- dev.to/mattdclarke/how-to-rate-limit-a-login-route-in-express-using-node-rate-limiter-flexible-and-redis-1i1k: Community tutorial on using it to protect a login route
- github.com/animir/node-rate-limiter-flexible/wiki/Comparative-benchmarks: The only benchmarks come from the author
- Socket.IO documentation: Points to rate-limiter-flexible for limiting events
- hackerNews / bluesky: No stories and no posts
GPT-6.2 Sol: 7.1, likely 5.9 to 8.3
Langfuse uses it for cloud API quotas, and jsDelivr's Globalping and Medic's Community Health Toolkit declare dependencies on the current major. A Node.js developer also reported a positive experience. Most of the evidence comes from downstream code and individual reports, so satisfaction across teams remains hard to estimate.
- github.com/langfuse/langfuse/blob/main/web/src/features/public-api/server/RateLimitService.ts: Cloud API code applies Redis-backed organization quotas.
- github.com/jsdelivr/globalping/blob/master/package.json: Globalping declares a version 11 runtime dependency.
- github.com/medic/cht-core/blob/master/package.json: Community Health Toolkit declares a version 11 runtime dependency.
- reddit.com/r/node/comments/1s4c0pr/how_to_measure_rps_per_user_in_a_multitenant: Developer reports that the library worked well in prior use.
Safe6.9
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has no runtime dependencies, no known advisories and a permissive ISC licence, so the attack surface is small. The OpenSSF Scorecard is only 5. Code review scores 2, and branch protection, a security policy and pinned dependencies all score 0. One mistake in publishing has been found and fixed: a .claude folder shipped in npm packages from 11.2.4 until 11.4.1.
- npm dependencies: No runtime dependencies
- advisories total: No known advisories
- scorecard score: 5 overall; Code-Review 2, Branch-Protection 0, Security-Policy 0
- github.com/animir/node-rate-limiter-flexible/releases: v11.4.1 removed a .claude folder that had shipped by mistake
- security.snyk.io/package/npm/rate-limiter-flexible: Snyk lists no vulnerabilities and an ISC licence
GPT-6.2 Sol: 6.8, likely 5.4 to 8.1
The permissive ISC license, zero runtime dependencies, and zero recorded OSV advisories favor adoption. OpenSSF Scorecard gives it 5/10, with weak code review and zero scores for branch protection, dependency pinning, and a security policy. npm lists one collaborator, and release signing and publishing safeguards are unverified, which keeps the range wide.
- npm dependencies, license; advisories total, last24Months: Zero runtime dependencies, ISC license, and zero recorded OSV advisories.
- scorecard score, checks: 5/10 overall, with packaging and signing unscored.
- github.com/animir/node-rate-limiter-flexible/security: GitHub shows no security policy or published repository advisories.
- npmjs.com/package/rate-limiter-flexible?activeTab=code: One npm collaborator is listed.
Good
- It supports more stores than any peer in one API: memory, Cluster/PM2, Redis, Valkey, Memcached, MongoDB, MySQL, Postgres, SQLite, Prisma, Drizzle and DynamoDB.
- It has no runtime dependencies and ships its own TypeScript types.
- It offers more than counters: block, penalty and reward, bursty and union limiters, queues, and an insurance limiter that takes over when the store fails.
- It is maintained actively, with 21 releases and 123 commits in the last year and only 6 open issues.
Bad
- It is a low-level API, so you write your own middleware and response headers, where express-rate-limit gives you a ready middleware.
- It counts in fixed windows, which can let bursts through at the edge of a window. It has no sliding-window algorithm built in.
- Release work rests mostly on one maintainer, with weak code review and no branch protection in the Scorecard.
- Downloads grew more slowly than the median, while express-rate-limit and Upstash Ratelimit grew much faster.
The numbers
- npm downloads, 4 weeks
- 19M ×3.4 in a year
- GitHub stars
- 3.6k
- Commits, 12 months
- 123
- npm version
- 11.5.0 Nov 2026
- Versions, 12 months
- 21
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.0 out of 10, Nov 2026
- Licence
- ISC
Read on 21 November 2026 from GitHub (animir/node-rate-limiter-flexible), npm (rate-limiter-flexible), OSV and the OpenSSF Scorecard.
Web security libraries
- 8.7DOMPurify
- 8.2Helmet
- 7.9express-rate-limit
- 7.6cors
- 7.4rate-limiter-flexible
- 7.0Upstash Ratelimit
- 6.8sanitize-html
- 6.1csrf-csrf
- 5.7Arcjet
- 5.0js-xss