Reliability

Throttle predictably and recover cleanly.

StateSet Voice protects tenant and platform resources with per-IP and per-tenant limits. Clients should read response headers, back off on 429, and treat call creation as a business operation.

Headers

HeaderMeaning
X-RateLimit-LimitThe request budget for the active limiter window.
X-RateLimit-RemainingThe remaining request budget after the current request.
Retry-AfterSeconds to wait before retrying after a 429.
x-request-idRequest correlation identifier to include in support and audit trails.

Retry behavior

async function requestWithBackoff(url, options, attempts = 4) {
  for (let attempt = 1; attempt <= attempts; attempt += 1) {
    const response = await fetch(url, options);
    if (response.status !== 429) return response;

    const retryAfter = Number(response.headers.get("retry-after") || "1");
    const jitter = Math.floor(Math.random() * 250);
    await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000 + jitter));
  }

  throw new Error("StateSet Voice rate limit retry budget exhausted");
}

Operational guidance

  • Keep interactive admin tooling separate from batch or export jobs.
  • Use smaller pages and scheduled exports for call logs and voice sessions.
  • Alert on sustained 429 because it usually means a client loop or a traffic shift needs attention.