Providers

Local

In-process rate limiting with the lowest latency and no external dependencies.

The local provider keeps all state inside the current process.

Why choose Local

  • lowest latency
  • no Redis dependency
  • simplest operational story
  • ideal for single-service APIs, jobs, CLIs, and tests

What to expect

  • keys are plain &str
  • methods are synchronous
  • state disappears when the process exits
  • limits are not shared across instances

Best fit

Use local limiting when one process owns the traffic you care about or when you deliberately want each instance to enforce its own local budget.

If many instances must coordinate around the same limit, move to Redis or hybrid.