Public APIs
Each API key gets a limit per plan, with bursts for well-behaved clients and a precise Retry-After for the rest.
Atomic, server-side rate limits. GCRA in one command, or named limiters with sliding window, token bucket or leaky bucket. No Lua required.
10 requests per minute for user 42. The reply says allowed, the limit, and how many remain.
An animated walkthrough with real HotKV commands and example replies. Click any step to jump to it.
An API without limits is one misbehaving client away from an outage. Doing the check in application code means a read, a calculation and a write, and concurrent requests slip through the gaps between them. Many teams end up maintaining a Lua script just to make it atomic.
GCRA.LIMIT decides and records in one step, so concurrent clients cannot both pass on the same state, and the limit refills smoothly instead of resetting at window boundaries. For limits you manage by name, RATELIMIT.CREATE sets up a sliding window, token bucket or leaky bucket limiter with statistics on what it allowed and denied.
10 requests per minute for user 42. The reply says allowed, the limit, and how many remain.
GCRA.LIMIT ratelimit:user:42 60000 10The scraper uses up its burst allowance and is then told how long to wait. A denied request changes nothing.
GCRA.LIMIT ratelimit:bot:7 60000 10Free-plan customers get 100 requests a minute on a sliding window.
RATELIMIT.CREATE free_plan 100 60000 ALGO sliding_windowAn export endpoint costs 20 units, so it uses more of the allowance.
RATELIMIT.CHECK free_plan customer:881 COST 20Settings, tracked keys and the totals of allowed and denied requests.
RATELIMIT.STATS free_planEach API key gets a limit per plan, with bursts for well-behaved clients and a precise Retry-After for the rest.
Attempts per IP and per account are limited to slow down credential stuffing.
Calls to a partner API or an LLM provider are kept under their quota across every worker in the fleet.
Smooth refill with bursts, atomic check and update, a retry time on denial.
GCRA.LIMITGCRA.RESETSliding window, token bucket or leaky bucket, created once and checked per key.
RATELIMIT.CREATERATELIMIT.CHECKExpensive calls can count as several requests. GCRA.LIMIT takes a count, RATELIMIT.CHECK a COST.
COSTAllowed and denied totals per limiter.
RATELIMIT.STATSNo. Both GCRA.LIMIT and RATELIMIT.CHECK do the whole check as one atomic command.
GCRA.LIMIT needs no setup and works on every plan. RATELIMIT.* named limiters add a choice of algorithm and statistics, and are part of the Performance and Scale plans.
Nothing. A denied GCRA call leaves the limiter unchanged, so a client that retries is not penalised further.
HotKV speaks the Redis protocol, so you can point an existing client at it and run these same commands.