Getting Started
Install oss-ratelimit, configure it with storage (like Redis), and implement your first basic rate limiter in a Node.js or Next.js application.
Getting Started
Installation
Install the library and its peer dependency redis
:
You might also need types for Redis if not automatically inferred:
Basic Setup
The quickest way to get started is by creating a single Ratelimit
instance. Ensure your Redis server is running or accessible.
For managing multiple limiters or simplifying client handling, we strongly recommend using the Client & Registry Management features described below.
Introduction
Get a high-level overview of oss-ratelimit,key features (inspired by Upstash, enhanced flexibility), and why you should use it for rate limiting in Node.js & Next.js.
Concepts & Algorithms
Understand the core concepts behind rate limiting (like token bucket, sliding window) and learn about the specific algorithms implemented within oss-ratelimit.