# rate-limiter-flexible: 7.4 out of 10

A strong pick. 5th of 10 in [Web security libraries](https://elestia.ai/opensource/web-security/index.md).

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

- **Overall: 7.4** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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.
- **Needed by many: 5.4** (likely 4.3 to 6.5)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (5.8): 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.
- **Helps a lot: 8.2** (likely 7.1 to 9.1)
  - Claude Opus 5.5 (8.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.
  - GPT-6.2 Sol (8.3): 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.
- **Holds up over time: 7.2** (likely 6.0 to 8.3)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.3): 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.
- **Used widely: 4.4** (likely 3.4 to 5.6)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (3.8): 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.
- **Vouched for: 6.1** (likely 4.5 to 7.2)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (7.1): 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.
- **Safe: 6.9** (likely 5.7 to 8.1)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (6.8): 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.

## 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

- Downloads, 4 weeks: 19M
- In a year: ×3.4
- GitHub stars: 3.6k
- Commits, 12 months: 123
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: ISC
- GitHub: https://github.com/animir/node-rate-limiter-flexible
- npm: https://www.npmjs.com/package/rate-limiter-flexible

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
