Distributed Systems

Distributed Rate Limiting Without the Infrastructure

Client-side rate limiting only works when you have one process. The moment you scale to multiple workers, instances, or services, each one only sees its own request count. Coordination breaks down, limits get blown, and your downstream APIs push back.

Why Client-Side Rate Limiting Breaks at Scale

5 workers each think they're at 20% of the limit. Combined, they're at 100%. This is the classic distributed systems coordination problem: local state is inconsistent with global state. Each worker's view of "how many requests have I sent" is completely disconnected from reality.

No per-worker throttling tuning will reliably fix this because it assumes a fixed number of workers. The moment you scale up or down, the per-worker limits are wrong.

ApproachWorks at scale?Infrastructure needed
Per-worker limitingNo — breaks on scalingNone
Redis token bucketMostly — no queuingRedis cluster + Lua scripts
API GatewayWrong direction — inbound onlyGateway infrastructure
RateQueueYesNone — fully managed

Central Coordination Without Infrastructure

RateQueue is the coordination layer — all your workers call acquire on the same resource, and it handles ordering, waiting, and limit enforcement centrally. You don't provision anything; you just use it.

// worker-1.ts, worker-2.ts, worker-3.ts — all use the same resource
import { ratequeue } from "@ratequeue/sdk";

await ratequeue.acquire(
  "stripe-api",
  { apiKey: process.env.RATEQUEUE_API_KEY! },
  async () => {
    await stripe.charges.create({ ... });
  }
);

It doesn't matter where these workers run — same host, different hosts, different regions. They all coordinate against the same limit.

Features Built for Distributed Systems

Queue lanes

Prevent one service from monopolizing the queue. Lanes keep traffic classes isolated so high-volume callers don't starve others.

Reserved capacity

Guarantee headroom for critical services. Reserve N units of capacity exclusively for high-priority traffic.

Global distribution

Co-locate the coordination plane with your workloads. Low-latency access from any region.

High availability

Managed infrastructure. Failover, replication, and uptime are not your problem.

Coordinate your distributed workers today

No Redis, no infrastructure, no coordination logic to maintain. Sign up free and wrap your first shared API call.