# Dynamic Api Rate Limiting

### Akto's Next Gen API Rate Limits Discovery:

Traditional rate limits require predefined RPM per API. At scale (hundreds of APIs), this is impractical. As organizations evolve, API traffic patterns change, making static limits brittle.

Traffic varies by endpoint (e.g., `/cancel-booking` vs `/book`) and over time (e.g., marketing spikes). Akto learns per-endpoint baselines and adapts as patterns shift.

#### Key Innovations

**Adaptive Learning:** Learns real usage over time.

**Endpoint-Specific Baselines:** Builds per-endpoint limits.

**Dynamic Adaptation:** Adjusts to spikes and longer-term shifts.

<figure><img src="https://2916937215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRc4KTKGprZI2sPWKoaLe%2Fuploads%2Fgit-blob-6039e1a510bf9a0eaacc6f0849a23fd201c03ce0%2Fapi-usage-distribution.png?alt=media" alt=""><figcaption></figcaption></figure>

## How to configure

By default, Akto Threat Protection applies a global rate limit rule.

To change settings, go to **Settings → Threat Configuration**.

### Default Configuration

Global dynamic rule that auto-learns per-endpoint baselines over 2 days. Uses p75 with 20% overflow and 0.5 confidence to throttle anomalies.

* **Rule Name**: `Global Rate Limit Rule`
* **Period**: `5 minutes`
  * Window duration
* **Behaviour**: `Dynamic`
  * Uses auto‑learned limits
* **Baseline Period**: `2 days`
  * Days used to learn usage patterns
* **Percentile**: `p75`
  * Requests made by 75% of users
* **Overflow Percentage**: `20`
  * Allowed burst above baseline
* **Rate Limit Confidence**: `0.5`
  * Minimum confidence in learned patterns

<figure><img src="https://2916937215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRc4KTKGprZI2sPWKoaLe%2Fuploads%2Fgit-blob-2b34d6115fe347145c7d383043deb0da1f33059b%2Frate-limit-config.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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.akto.io/api-protection/concepts/api-rate-limit.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.
