Thresholds and Rate Limits
Group thresholds protect your databases from queries that run too long or are called too often. They are configured per group.
Slow-query threshold
The slow-query threshold is a duration (in seconds). When a query takes longer than this to run, Kvery flags it as slow in the logs so you can spot and optimise problem queries. The default threshold is 30 seconds.
Use this to surface queries that need an index, a LIMIT, or a rewrite — before
they affect your production database.
Rate limit
The rate limit caps how many times a query can be called through its public API within a time window, so an endpoint cannot be called far more often than intended. It is counted separately for every query and every caller (client IP address); running the query in Kvery itself, through a shared link or through the MCP server and its REST API — which has its own per-user limits — is not limited by it.
You configure:
- The maximum number of requests allowed.
- The window (in seconds) over which that maximum applies.
The group's values are the defaults for its new queries, and every query can
override them in its own settings. A value of 0 switches the limit off.
The window starts with the first request. When the maximum is reached, further
requests are answered with HTTP 429 Too Many Requests (with a Retry-After
header) until the window ends; then a new window starts. Requests that stay within
the limit are never rejected. By default the rate limit is off (no cap); set it
explicitly to enforce one.
Choosing good values
- Start the slow-query threshold near your acceptable response time, then lower it as you optimise.
- Set a rate limit on any group that exposes public API endpoints, sized to your expected legitimate traffic plus headroom.
- Review the logs regularly to see which queries trip the slow-query threshold most often.