Query budgets and rate limits
Oriel has two separate limit systems. Query budgets protect ClickHouse-backed telemetry reads. Rate limits protect public auth, invite, signup, and feature flag SDK endpoints through Valkey.
Query budgets
Section titled “Query budgets”Query settings live under [query]:
[query]deadline = "25s"max_execution = "15s"scan_budget_aggregate = 4000000000scan_budget_list = 1000000000| Key | Default | Effect |
|---|---|---|
deadline |
25s |
End-to-end HTTP request deadline for query handling. |
max_execution |
15s |
ClickHouse max_execution_time compiled into OQL plans. |
scan_budget_aggregate |
4000000000 |
max_rows_to_read for aggregate-shaped queries. |
scan_budget_list |
1000000000 |
max_rows_to_read for list-shaped queries. |
Use lower budgets to fail expensive queries earlier. Use higher budgets only
after checking ClickHouse capacity and the query pattern that is hitting
ORL-2004 or ORL-2005.
Rate limits
Section titled “Rate limits”Rate limits live under [rate_limit] and require Valkey:
[rate_limit]enabled = truewindow = "1m"auth_attempts = 10signup_attempts = 5invitation_attempts = 20sdk_requests = 600| Key | Default | Protects |
|---|---|---|
auth_attempts |
10 |
Login and OIDC start/callback attempts. |
signup_attempts |
5 |
Public signup attempts. |
invitation_attempts |
20 |
Invitation preview and accept endpoints. |
sdk_requests |
600 |
Feature flag SDK evaluate, ruleset, and stream endpoints. |
The fixed window is per client identity. Disabling rate limits removes this guard from public endpoints; it does not remove OQL scan budgets.
Environment overrides
Section titled “Environment overrides”ORIEL_QUERY_DEADLINE=30sORIEL_QUERY_MAX_EXECUTION=20sORIEL_QUERY_SCAN_BUDGET_AGGREGATE=6000000000ORIEL_QUERY_SCAN_BUDGET_LIST=1500000000ORIEL_RATE_LIMIT_ENABLED=trueORIEL_RATE_LIMIT_WINDOW=1mORIEL_RATE_LIMIT_AUTH_ATTEMPTS=10ORIEL_RATE_LIMIT_SIGNUP_ATTEMPTS=5ORIEL_RATE_LIMIT_INVITATION_ATTEMPTS=20ORIEL_RATE_LIMIT_SDK_REQUESTS=600Verify changes
Section titled “Verify changes”Run:
oriel --config /etc/oriel/oriel.toml doctorFor query budget changes, use Explore or POST /api/v1/workspaces/{ws}/oql/explain
to inspect the compiled scan budget for a query shape. For rate-limit changes,
check Valkey connectivity first; Oriel is not ready when Valkey is unavailable.