Rate limits without running Redis.

Define a bucket once, check any key on every request, and get told when to retry.

Read the docs
coss.risk.limit()
const {  } = await ..({
  : "password_reset",
  : .,
});

if ( && !.) {
  const  = .((. ?? 0) / 1000);
  throw new (`Try again in ${} seconds.`);
}

password_reset

5 per hour, per address

allowed
{
  "allowed": true,
  "limit": 5,
  "remaining": 4,
  "reset_ms": 720000,
  "retry_after_ms": null,
  "degraded": false
}

Bursts, then a steady rate

Every key gets burst tokens that refill at the bucket's rate, using GCRA, the same engine that limits coss.com's own API.
Read the docs
searchlimit: 10, period_seconds: 60, burst: 30
  • At once30
  • Minute 110
  • Minute 210
  • Minute 310

Limit by anything

A user, an email address or an IP address, up to 512 characters. coss.com stores only a keyed hash of it.
Read the docs
Keys
Limit byYou sendcoss.com stores
Useruser_8fK2a9f2c…a17e
Emailada@example.com41be…07d3
IP address203.0.113.7c60a…e92b
apiburst: 100
Requestcostremainingallowed
search199true
export2079true
full_backup10079false

Heavier requests cost more

Take several tokens at once for an export or a batch. A denied request takes nothing.
Read the docs
While coss.com can't count
on_failurealloweddegraded
allowtruetrue
denyfalsetrue

You choose how it fails

Keep your product up, or protect what's expensive, per bucket. The answer tells you either way.
Read the docs
Algorithm
GCRA
Buckets per environment
100
Bucket names
1–64 characters, unique, fixed
Period
1 second to 1 day
Tokens per bucket
up to 1,000,000
Key length
up to 512 characters, stored hashed
Failure mode
allow (default) or deny
Checks per API key
500 per second, bursts of 1,000
Denied check
200 with allowed false

Questions

On the same key, SDK, webhooks and logs: nothing more to set up.

Start with Rate limiting today.

Development keys record every request and event and deliver nothing.

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.