# Rate Limiting

## Rate limiting calls to Schema Registries and Connect Clusters

To rate limit the calls the Agent makes to Schema Registries or Connect Clusters set the following the Agent configuration:

```properties
# schema registry
lenses.schema.registry.client.http.rate.type="sliding" 
lenses.schema.registry.client.http.rate.maxRequests= 200
lenses.schema.registry.client.http.rate.window="2 seconds"

# connect clusters
lenses.connect.client.http.rate.type="sliding"                 
lenses.connect.client.http.rate.maxRequests=200        
lenses.connect.client.http.rate.window="2 seconds"  
```

The exact values provided will depend on your setup, for example the number of schemas, how often are new schemas added, so some trial and error is required.

## Limiting Concurrent SQL Queries

Starting with 6.1.3 version, there's a global limit on concurrent queries, as well as a limit per user. They can be set via the [agent configuration](https://docs.lenses.io/latest/deployment/configuration/agent/overview):

```properties
lenses.sql.settings.max.concurrent.queries=200
lenses.sql.settings.max.concurrent.queries.per.user=2
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/deployment/configuration/agent/rate-limiting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
