# Como evitar limites de throttling com chave de API de administrador?

**URL:** <https://meta.discourse.org/t/how-to-avoid-throttling-limits-with-admin-api-key/274206>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [7 Agosto , 2023 15:18 UTC](https://meta.discourse.org/t/how-to-avoid-throttling-limits-with-admin-api-key/274206 "2023-08-07T15:18:34Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [13 Outubro , 2023 08:58 UTC](https://meta.discourse.org/t/how-to-avoid-throttling-limits-with-admin-api-key/274206/10 "2023-10-13T08:58:41Z")

</div>

Algo como

```plaintext
map $remote_addr $exclude_from_limit {
    default 0;
    192.168.1.1 1;
    192.168.1.2 1;
}

```

e então envolva os limites em um `if`

```plaintext
        if ($exclude_from_limit = 0) {
            limit_req zone=flood burst=24 nodelay;
            limit_req zone=bot burst=400 nodelay;
            limit_conn connperip 20;
        }

```

Sim, você deve fazer algumas substituições com pups durante a compilação para tornar isso persistente, veja, por exemplo, `web.ssl.template.yml` sobre como abordar isso.

Ou você pode esquecer isso e fazer seu script cliente de API rodar mais devagar inserindo alguns sleeps em locais estratégicos. ← abordagem recomendada

---

_[View the full topic](https://meta.discourse.org/t/how-to-avoid-throttling-limits-with-admin-api-key/274206)._
