# Upstash Ratelimit: 7.0 out of 10

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

Upstash Ratelimit is an HTTP-based rate limiter for serverless and edge runtimes. It stores its counters in Upstash Redis. It is the usual choice for rate limiting a Next.js or Vercel app, and its use grew fast this year. It only limits request rates, and it ties you to a paid hosted Redis.

**Best for:** Teams on Vercel, Cloudflare Workers or other serverless platforms who need shared rate limits without managing a Redis connection.

## Scores

- **Overall: 7.0** (likely 5.9 to 8.1)
  - Claude Opus 5.5 (6.5): For serverless and edge apps, especially on Vercel, it is the simplest well-maintained way to share rate limits, and its use is growing fast. It does only one part of the category's job and ties you to a paid Upstash database. On long-running servers, express-rate-limit or rate-limiter-flexible are more flexible picks.
  - GPT-6.2 Sol (7.5): Upstash Ratelimit is a strong pick for new edge and serverless apps that need shared counters and already use Upstash Redis. Express-rate-limit is a more direct fit for conventional Express apps, and rate-limiter-flexible gives Node teams more backend choices. The hosted dependency, deployment-specific latency, and still modest indexed adoption widen the range.
- **Needed by many: 4.2** (likely 3.1 to 5.3)
  - Claude Opus 5.5 (4.0): Rate limiting is a common need, but this library serves one slice of it: serverless and edge apps that accept Upstash Redis. Long-running Node servers usually pick express-rate-limit or rate-limiter-flexible. The category also covers headers and HTML cleaning, which this library does not do.
  - GPT-6.2 Sol (4.4): Many public APIs need request throttling, and the HTTP transport makes this library usable across several frameworks and runtimes. Its strongest fit is the smaller group that needs shared counters and is willing to use hosted Upstash Redis. The framework survey gives context for the size of the web backend audience, while the share that needs this setup is uncertain.
- **Helps a lot: 7.5** (likely 6.4 to 8.5)
  - Claude Opus 5.5 (7.0): It has several algorithms, multi-region support, an in-memory cache for blocked IDs, deny lists, analytics and good types, all behind a simple API. The documentation is good, and many examples make it easy for AI agents to write correct code. Its limits are the lock-in to Upstash Redis and the extra care that edge runtimes need for pending promises and multi-region accuracy.
  - GPT-6.2 Sol (7.9): Version 2.2.1 gives edge apps a small typed API, several algorithms, and useful controls for caching, request weights, and dynamic limits. Bundled docs give coding agents version-specific references, though runtime-specific background work still needs care. Redis latency varies by deployment, and the approximate sliding window limits confidence for teams that need strict quotas.
- **Holds up over time: 7.1** (likely 6.0 to 8.2)
  - Claude Opus 5.5 (7.0): A company whose business depends on the library maintains it. There were six releases in the last year, the latest in November 2026, and few issues are open. Activity is moderate, with 24 commits a year against 120 or more for the rate-limiting peers, and 12 pull requests are open. The library's future is tied to Upstash as a company.
  - GPT-6.2 Sol (7.2): Upstash maintains the library alongside its Redis service, and four npm versions in the past year show continued maintenance. The release history shows two people publishing GitHub releases, though a request for ioredis support has stayed open since 2024. The two-year outlook depends on one vendor's service and priorities.
- **Used widely: 5.2** (likely 4.0 to 6.3)
  - Claude Opus 5.5 (5.5): Downloads are 13.5M per 4 weeks, up from 1.17M a year ago. That is a ratio of about 11.6, far above the 4.1 median. It has 2,053 dependent repositories, below rate-limiter-flexible's 3,010 and express-rate-limit's 27,591. Templates and automated installs inflate the download count. Direct choices are likely in the tens of thousands and growing.
  - GPT-6.2 Sol (4.8): Four-week downloads rose 11.6× year over year, well above the catalog median of 4.1×. The partial index found 2,053 dependent repositories and 55 dependent packages, behind both rate-limiting peers on repository count. Automated installs and indirect use make it hard to tell how much of the download growth came from new projects choosing it.
- **Vouched for: 6.2** (likely 4.7 to 7.3)
  - Claude Opus 5.5 (6.0): Vercel offers official templates built on it, and Next.js guides and third-party roundups recommend it for serverless rate limiting. Independent write-ups call it a good library, but there are no benchmarks or survey data. Most material comes from Upstash or from tutorials.
  - GPT-6.2 Sol (6.3): Dub uses the library in its application, and Vercel documents where its token bucket fits alongside the platform's own rate limiting. Developer discussions support its serverless fit and raise the cost of checking Redis on the request path. Evidence for retention and comparative SDK performance remains thin.
- **Safe: 7.5** (likely 6.3 to 8.6)
  - Claude Opus 5.5 (7.5): There are no known advisories. It has one runtime dependency and an MIT licence, and it publishes through npm OIDC. There is no OpenSSF Scorecard to check, and v2.1.0 added SDK telemetry. Every request depends on an outside paid service, so you need to set a timeout and choose what happens when the service is unreachable.
  - GPT-6.2 Sol (7.5): The package uses the permissive MIT license and has one direct dependency plus the Upstash Redis peer dependency. The release workflow moved to npm trusted publishing with provenance, and OSV lists zero advisories for the package. The default timeout lets traffic through when a check takes too long. Missing OpenSSF Scorecard data limits confidence in the broader repository controls.

## Good

- It works over HTTP, so it runs in edge runtimes and serverless functions where TCP Redis clients fail.
- It offers fixed-window, sliding-window and token-bucket algorithms, plus multi-region, caching, deny lists and dynamic limits.
- It has one runtime dependency, full TypeScript types, and Vercel and Next.js templates to copy.
- Downloads grew about 11.6 times in a year, well above the 4.1 median.

## Bad

- It needs an Upstash Redis database, which is a paid hosted service, so you are tied to one vendor.
- It only limits request rates. Headers, CSRF, bot detection and HTML cleaning need other tools.
- On edge runtimes you must handle the pending promise yourself, or multi-region sync and analytics can break.
- Recent versions added SDK telemetry and changed token-bucket behaviour, so check upgrades.

## The numbers

- Downloads, 4 weeks: 14M
- In a year: ×12
- GitHub stars: 2.1k
- Commits, 12 months: 24
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/upstash/ratelimit-js
- npm: https://www.npmjs.com/package/@upstash/ratelimit

It needs Upstash Redis, a paid service.

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.
