Rate Limits
Per-Service Limits
| Service | Rate Limit | Burst | Max Connections |
|---|---|---|---|
| Storage | 1000 req/min | 20 | 10 |
| LLM | 1000 req/min | 20 | 10 |
| Database | 500 req/min | 10 | 5 |
| Firewall | 100 req/min | 5 | 5 |
Response Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1699012400
Handling Rate Limits
import time
def api_call_with_backoff(func):
max_retries = 5
for attempt in range(max_retries):
try:
return func()
except RateLimitError as e:
if attempt < max_retries - 1:
wait_time = min(2 ** attempt, 60)
print(f'Rate limited. Waiting {wait_time}s...')
time.sleep(wait_time)
else:
raise