Content

Best Rate Limiting and Quota Tools for Agent Fleets

Most api rate limiting tools protect one process. Agent fleets share one provider quota, and that's a different problem.

EngineeringNov 20, 2026

Key takeaways

  • -A single worker's token bucket does nothing to stop five other workers from exhausting the same shared provider quota.
  • -Kong, Tyk, Envoy and Upstash Ratelimit can pool rate-limit counters across processes with Redis, but none were built specifically for agent fleets.
  • -Treblle and similar monitoring tools show you the quota problem; they don't solve it.
  • -Swytchcode retries rate-limited calls safely with idempotency keys, but it is not a quota-pooling product, and we say so plainly.

The real problem isn't per-process limits, it's a shared quota

Every team that puts an agent fleet in front of a third-party API hits the same wall eventually. Stripe, Salesforce, or whatever provider you're calling hands out one rate limit per account, sometimes per key. Your fleet doesn't have one caller. It has ten, or fifty, or however many worker processes you spun up to handle the load.

A per-process rate limiter, the kind most teams reach for first, has no idea the other forty-nine workers exist. Each one enforces its own local token bucket, confident it's staying under the limit, while the provider counts all fifty against the same number. The limiter isn't broken. It's answering a question nobody asked: "am I behaving?" instead of "is the fleet behaving?"

That gap is what most "best rate limiting tool" roundups skip. We built this one around it: which tools pool counters across processes, which only protect a single instance, and what happens on the retry that follows a 429 either way. We checked every claim below in November 2026, and say plainly where a vendor's own docs didn't answer the question.

How we scored these

We looked at five things per tool: whether its rate-limit state is shared across processes (fleet-wide pooling) or local to one instance, which algorithm it uses, what it does on a 429 from an upstream provider, how it's priced at agent-fleet volume, and whether its docs even discuss safe retries on writes. That last point sounds narrow, but it's what separates "slows calls down" from "makes a retried call safe," and almost nothing in this category does the second.

Pricing and feature details below came directly from each vendor's own docs and pricing pages in November 2026.

1. Kong

Kong's open-source Gateway ships a Rate Limiting plugin with three counting policies: local, cluster, and redis. Per Kong's own plugin docs, local counters live in memory on each node, which is cheap but drifts as nodes are added.

The two that matter for a fleet are cluster, counters shared via Kong's data store but explicitly unsupported in hybrid or Konnect deployments, and redis, counters shared on an external Redis server. Kong's docs give a telling example: a 100-requests-per-second limit on a balanced 5-node cluster can only be approximated with local by setting 30 per second per node, an admission that local-only limiting is a workaround.

For sliding or fixed windows with Redis Sentinel or Cluster support, Kong points to its separate, paid Rate Limiting Advanced plugin. Kong Gateway itself is open source and free to self-host; Konnect pricing (checked November 2026) starts at $25/month plus usage for Plus, with Enterprise quoted separately.

If you already run Kong, the redis policy gets real fleet-wide pooling. If you don't, standing it up just for one shared counter is a lot of infrastructure for one feature.

2. Tyk

Tyk is an open-source API gateway (Gateway and Pump are MPL 2.0, free to self-host) with rate limiting and quotas built in. Tyk's docs separate the two cleanly: rate limits throttle short windows, quotas cap longer periods, both configurable per key or policy.

The dashboard, developer portal, and the hybrid deployment model that would let you run a distributed, multi-node cluster are licensed features on Tyk's Core or Professional tiers. Tyk's pricing page (checked November 2026) prices Core by number of APIs managed and Professional as a flat rate by data plane, not by traffic volume, a genuinely different shape than most tools here.

Tyk's free options are time-limited trials (48 hours on Cloud, 14 days self-managed). For a fleet, the shared-counter behavior you'd want from a real multi-node deployment depends on those licensed components, not the free core alone.

3. Unkey

Unkey is a developer platform built around API keys, with rate limiting as a core feature rather than a bolted-on plugin. Unkey's docs describe limits applied by customer identity, key, endpoint, or IP, using a sliding window.

The detail that matters here: per-customer limits are shared across every key issued to that customer, so extra keys don't buy extra budget. Unkey also separates rate limits (approximate, fast-moving) from monthly quotas (exact credits that refill on schedule), which maps closely to the "slow down" versus "you're out for the month" split a fleet actually needs.

Unkey is honest about a real tradeoff: counters converge across regions rather than staying perfectly exact, and its docs state plainly that counts "can run a little high when traffic is split across regions." Unkey's pricing (checked November 2026) lists a free tier at 150K requests/month and 1K keys, with Pro at $25/month.

4. Treblle

Treblle earns a spot for a different reason: it's an API observability and governance platform, not a rate limiter, and a good example of a tool that shows you the quota problem without fixing it. Treblle's pricing page (checked November 2026) lists observability, alerting, and traceability across its Core, Growth, and Enterprise tiers, plus plan-level caps on requests per minute and month.

That's api call monitoring in the literal sense: you can watch request volume climb toward a provider's limit across the whole fleet in near real time. What the pricing page doesn't describe is any mechanism for actually throttling or pooling that traffic. It's a dashboard sitting beside the problem, not inside it.

Treblle's Core tier runs $233/month billed yearly for up to 5 APIs and 5 million requests monthly, a real cost if you're adopting it purely to watch quota rather than for the security and governance features where it's strongest.

5. Upstash Ratelimit

Upstash Ratelimit is a small open library, not a gateway, built for serverless and edge runtimes: Cloudflare Workers, Vercel Edge Functions, Next.js, anywhere a long-lived Redis connection isn't practical. Upstash's docs call it "the only connectionless (HTTP based) rate limiting library," meaning it talks to Redis over HTTP so a stateless function can check a shared counter without an open connection.

That shared-Redis design is exactly what fleet-wide pooling needs: every worker, however short-lived, reads and writes the same counters. It supports multiple algorithms and multi-region Redis for lower latency.

Pricing rides on Upstash's Redis plans, not a separate fee. Upstash's pricing (checked November 2026) gives a free tier of 500K commands/month, then pay-as-you-go at $0.20 per 100K commands with no cap. For a fleet all hitting one Redis-backed limiter, that's worth modeling, since rate-limit checks are commands too.

6. Envoy-based API gateways

Envoy has no built-in rate limiter like Kong or Tyk. Instead, Envoy's own architecture docs describe global rate limiting as a call to an external gRPC service on every connection or request, so the shared counting happens in that service, not in Envoy itself.

The reference implementation most teams deploy is the open-source envoyproxy/ratelimit project, written in Go, backed by Redis, though any service implementing Envoy's protocol can fill the role. Envoy's docs note a local token bucket can run first to absorb bursts before anything hits the global service.

This is the most architecturally correct answer here, since the limiting decision is centralized by design rather than approximated across nodes. It's also the most work: you're operating a separate rate-limit service and a Redis backend. Natural if Envoy or Istio is already in your stack, a lot of plumbing to borrow if it isn't.

7. Build your own: Redis token-bucket and sliding-window patterns

Plenty of teams never adopt a dedicated product and instead write a token bucket or sliding window directly against Redis, often in under a hundred lines: INCR a key scoped to the provider and time window, set a TTL, compare against the limit. Every worker, regardless of language, talks to the same Redis instance, which is exactly the fleet-wide pooling a per-process approach lacks.

The appeal is obvious: no new vendor, no new pricing page, logic your own team can read. The cost shows up after a few months in production. Atomic check-and-increment needs Lua scripting to avoid race conditions, and multi-region deployments reintroduce the same convergence tradeoffs Unkey and Envoy's own teams document openly. You also own every edge case: a slow Redis, a key expiring mid-burst, what a retry should do once the limiter says no. It's a common, legitimate choice precisely because it's simple to start, but "simple to start" and "correct under load" are different claims.

Side-by-side comparison

ToolFleet-wide pooling?Backoff strategyPricing (as of Nov 2026)
KongYes, with `redis` or `cluster` policy; `local` is per-node only429 with `Retry-After`; no built-in client-side exponential backoffOpen source free to self-host; Konnect Plus from $25/mo + usage; Enterprise custom
TykOnly via licensed hybrid/dashboard deployment; open-source Gateway alone is single-nodeEnforced at the gateway; retry behavior left to the clientCore usage-based by API count; Professional flat by data plane; Enterprise custom
UnkeyYes, per-customer limits shared across keys; cross-region counts approximate by designReturns `success:false`; caller implements its own 429 handlingFree: 150K requests/mo; Pro $25/mo
TreblleNo pooling; observability layer that shows quota usage, doesn't limit itNot applicable, it doesn't limit or retry callsCore $233/mo billed yearly; Growth and Enterprise custom
Upstash RatelimitYes, shared Redis counters over HTTP from any stateless workerReturns a decision object; backoff logic left to the appFree: 500K Redis commands/mo; pay-as-you-go $0.20/100K commands
Envoy + envoyproxy/ratelimitYes, centralized by design in the external gRPC rate-limit serviceLocal token bucket absorbs bursts before the global checkOpen source; cost is the Redis and compute to run the service
DIY Redis token bucketYes, if every worker hits the same Redis instanceEntirely custom, built and maintained by your teamCost of Redis plus engineering time

Where Swytchcode fits (and where it doesn't)

Worth being direct here: Swytchcode is not a fleet-wide quota-pooling product, and we're not going to stretch this list to pretend otherwise. Nothing in it tracks a shared counter across your agent workers the way Upstash Ratelimit or a Redis token bucket does. If your actual problem is "fifty workers are about to blow through one Stripe account's rate limit," you want Upstash Ratelimit if you're serverless, or a Redis-backed gateway policy if you already run Kong, Tyk, or Envoy.

What Swytchcode handles specifically is the moment right after a provider returns a rate-limit error. Every call through its execution pipeline retries on rate limits with backoff, and POST or PATCH calls are only retried automatically when an idempotency key is set. That distinction matters more than it sounds. Almost every tool above, including the ones that pool quota correctly across a whole fleet, will happily retry a write after a 429 without checking whether the first attempt already went through. A retried refund call isn't a retry, it's a second refund, and a rate limiter built only to slow calls down doesn't know or care about that risk.

So these two problems sit next to each other rather than on top of each other. Fleet-wide quota pooling tells workers when to back off from a shared limit. Safe retry on writes decides what's allowed to happen automatically once a retry fires, pooled or not. A fleet can have excellent quota pooling and still double-charge a customer on the retry that follows a legitimate rate-limit error, because pooling and write safety are different guarantees. We go deeper on why in our complete guide to API idempotency and in what API idempotency actually means for a retried write.

If you're building the fleet-wide piece yourself with Redis or an Envoy-based gateway, pair it with API call monitoring for AI agents, since watching quota consumption and enforcing it, as the Treblle example shows, are two different jobs that get conflated constantly. And if the gateway question is what's actually unresolved, our rundown of API gateway alternatives for AI agents covers the ingress side this post deliberately skipped, since agent risk tends to sit on the egress side instead. Swytchcode's own retry mechanics are documented at docs.swytchcode.com/guides/retries/.

FAQ

Can a per-process rate limiter protect a shared API quota across an agent fleet?

No, not on its own. A per-process limiter only sees calls made by the process it runs in. If a provider's quota is shared across your whole fleet, as it usually is for a single Stripe or Salesforce account, every other worker's calls still count against that limit regardless of what your local limiter decided. You need a counter that's actually shared, typically Redis or a centralized service.

Is Redis required for fleet-wide rate limiting?

In practice, yes, for nearly every option here. Kong's redis policy, Upstash Ratelimit, and the Envoy reference implementation all store shared counters in Redis. Tyk and Unkey abstract the storage layer away in their hosted products, but the underlying need is identical: one fast, shared place for every worker to read and write the current count.

Does retrying after a rate-limit error risk duplicate side effects, like double charges?

Yes, and it's the part most rate-limiting tools don't address at all. A rate limiter's job is to slow a call down or reject it; it generally has no opinion on whether retrying a write that already partially succeeded is safe. That's a separate concern, idempotency, and it needs its own mechanism, usually an idempotency key attached to the request so the provider recognizes a retry as the same operation rather than a new one. Our guide to API idempotency covers how that works in practice.

More content