coss.com vs Unkey

Unkey has per-user overrides and regional counters. coss.com's limiter keeps named buckets with a separate burst, on your coss.com API key.

Read the docs
At a glanceChecked . Sources
Featurecoss.comUnkey
PriceOne quota, shared with key verificationsNo per-check price: part of every coss.com planFree: 150,000 valid requests a month. Pro: $25 a month for 250,000, up to $1,000 for 100,000,000; over-limit checks aren't billed
Rate of checksNo figure in Unkey's docs500 per second per API key, bursts of 1,000—
How a limit is setA named bucket, created once in the dashboard or the API; each check names the bucket and a keylimit and duration sent with every request; the namespace is created on first use
Changing a limitUpdate the bucket, and the next check uses itChange the code, or add an override, which takes about a minute to apply
Limits per customerOne rule per bucket: make a bucket per tier, up to 100 per environmentOverrides per identifier or wildcard pattern (*@acme.com)
AlgorithmGCRA, with a burst set apart from the steady rateSliding window; remaining is a close estimate
Period1 second to 1 day1 second to 30 days
Cost per check1 or more tokens0 or more: 0 reads without counting

Which to choose

Both are good at what they do. Here is where each one fits better.

Choose Unkey when
  • You give some customers different limits

    An override changes one identifier or a wildcard pattern without a deploy, which suits per-customer deals. coss.com has one rule per bucket, so tiers mean separate buckets and code to pick one.

  • Your traffic is global

    Unkey decides in the region that sees the request. coss.com counts in one central store, so checks from far away take longer.

  • You check several limits per request

    multiLimit checks up to 100 limits in one call and counts none of them if any fails. With coss.com, that's one call per bucket, and each counts on its own.

  • You also issue API keys

    Unkey's keys and identities carry limits checked at verification. coss.com doesn't offer API keys for your own product.

  • You need windows longer than a day, or to run it yourself

    Unkey's durations go up to 30 days, and its code is source-available with self-hosting allowed. coss.com's periods stop at a day, and it's offered as a hosted service.

Choose coss.com when
  • No meter

    Checks are part of every coss.com plan, so a limiter on a busy endpoint doesn't add a line to your bill.

  • Bursts as their own setting

    With limit: 10, period_seconds: 60 and burst: 30, a key can make 30 requests at once and then 10 a minute.

  • The numbers live outside your code

    Code names a bucket. Its limit, burst and failure mode are in the dashboard and the API, and the next check uses them, with no deploy.

  • Retries don't double-spend

    The SDK retries network errors with the same Idempotency-Key, so a flaky connection never spends a user's tokens twice.

  • Keys stay hashed

    coss.com keeps only a keyed hash of each key, so email addresses and IP addresses you limit by aren't stored.

  • Next to Risk

    A limit answers how often and an assessment answers who, on one API key: limit password resets per address, and assess sign-ups with velocity across your environment.

Moving from Unkey

  1. 1

    Turn each limit into a bucket

    Each namespace, limit and duration you use becomes coss.risk.limitBuckets.create({ name, limit, period_seconds }). Durations go from milliseconds to seconds, up to a day, with on_failure set to what you want during an outage.

    Read the guide
  2. 2

    Swap the check

    unkey.ratelimit.limit({ namespace, identifier, limit, duration }) becomes coss.risk.limit({ bucket, key, cost }). success becomes allowed, and reset (a timestamp) becomes reset_ms (from now), with retry_after_ms when denied. Counts start from zero.

    Read the guide
  3. 3

    Replace overrides

    Overrides have no equivalent: make a bucket per tier and choose one by the customer's plan. multiLimit becomes one call per bucket.

    Read the guide

Questions

The coss.com side

Try coss.com next to Unkey.

A development key costs nothing and delivers nothing, so you can compare with real code.

Pricing

Add coss.com to this project: read https://coss.com/llms.txt, get a development key with `npx coss-cli init --agents`, and build and test with it.