animir/node-rate-limiter-flexible

Atomic and non-atomic counters and rate limiting tools. Limit resource access at any scale.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 1 hour ago
Added to GitGenius on September 19th, 2026
Created on May 6th, 2018
Open Issues & Pull Requests: 9 (+0)
GitHub issues: Enabled
Number of forks: 195
Total Stargazers: 3,586 (+0)
Total Subscribers: 19 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.7 hours
Mean response time: 90.6 days
90th percentile: 573.3 days
Tracked items: 47

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,065 days
Stale 30+ days: 5
Stale 90+ days: 5

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (16)
  • enhancement (10)
  • feature (6)
  • bug (4)
  • good first issue (1)
  • investigation (1)
  • notes (1)
  • solved (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

node-rate-limiter-flexible is a rate limiting library that counts and limits the number of events to protect applications from DoS and brute force attacks at any scale.

The library solves the problem of controlling resource access by providing atomic counters that prevent race conditions in both single-process and distributed environments. It works across multiple storage backends including Valkey, Redis, Prisma, DynamoDB, in-process memory, Cluster, PM2, Memcached, MongoDB, MySQL, SQLite, and PostgreSQL. The tool uses atomic increments to ensure consistency and offers a unified API across all limiter types, allowing applications to switch backends as they scale without changing application code.

Developers should choose this tool if they need rate limiting that works reliably in distributed systems or if they want to avoid external dependencies for simple in-memory limiting. It suits projects ranging from small applications using memory-based limiting to large systems requiring distributed rate limiting across multiple nodes. The library is particularly valuable for teams that may migrate between storage solutions as their application grows, since the same code works with any supported backend. The tool includes specialized strategies like Block Strategy for handling extremely high-volume attacks and Insurance Strategy for failover when the primary store is unavailable.

The project maintains active engagement with multiple storage client libraries, supporting both newer options like Valkey and established packages like Redis and ioredis. Development includes comprehensive documentation with LLM-friendly formats and detailed wiki pages covering algorithms, benchmarks, and advanced features. The codebase includes TypeScript declarations bundled with the package and demonstrates compatibility across diverse environments including browser-based memory limiting and Deno runtime support.