Skip to content

Rate Limits

Release binding: v0.1.0-enterprise-ready · AMI ami-010806d4d3445660e · 2026-05-19

hx-gate enforces per-tenant rate limits with a sliding-window algorithm. Limits are operator-set per tenant; there are no fixed plan tiers.

Defaults and overrides

Setting Default Where it is set
rate_limit_requests 100 Per tenant, at POST /gate/onboard/create
rate_limit_window_s 60 Per tenant, at POST /gate/onboard/create

The gate-wide defaults apply when a tenant is created without explicit values; per-tenant values override them.

How it works

  1. Each request from a tenant increments a counter keyed by the tenant.
  2. The counter uses a sliding window of rate_limit_window_s seconds.
  3. If the count exceeds the limit, the request is rejected before it is forwarded to the engine.

Exceeded responses

HTTP/1.1 429 Too Many Requests
Retry-After: 12
{
  "detail": "Rate limit exceeded for tenant 'team-a'. Retry after 12s."
}

Client handling

import time

def with_backoff(call, max_retries=3):
    for attempt in range(max_retries):
        try:
            return call()
        except RateLimitedError as e:
            if attempt < max_retries - 1:
                time.sleep(e.retry_after or 2 ** attempt)
            else:
                raise

Best practices

  • Use PUT /v1/put/cores/batch for bulk ingestion to reduce request count.
  • Implement retry with backoff for every 429, honoring Retry-After.
  • If a tenant consistently hits its limit, raise that tenant's rate_limit_requests at onboarding or with the onboarding update route.