# Rate limiting based on key in request body

**URL:** <https://community.traefik.io/t/rate-limiting-based-on-key-in-request-body/20148>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [October 13, 2023, 10:19am UTC](https://community.traefik.io/t/rate-limiting-based-on-key-in-request-body/20148 "2023-10-13T10:19:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![puja](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@puja](https://community.traefik.io/u/puja)\
**Post date:** [October 13, 2023, 10:19am UTC](https://community.traefik.io/t/rate-limiting-based-on-key-in-request-body/20148/1 "2023-10-13T10:19:52Z")

</div>

1. For my system, client ids are present in the request body in the API and we want to check for rate limits on different clients by reading that client id from the request body. Is there an existing plugin which helps in rate limiting based on keys present in the request body.

2. Does traefik support reading rate limit configs from a common db store. My use cases include having hundreds of clients and having different rate limit config for each client. This mapping of rate limit config and client id should reside in some database and traefik should be able to fetch the rate limit configs by reading the same datasource.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [October 13, 2023, 12:06pm UTC](https://community.traefik.io/t/rate-limiting-based-on-key-in-request-body/20148/2 "2023-10-13T12:06:10Z")

</div>

Check the [list of existing Traefik plugins](https://plugins.traefik.io/plugins) or [build your own](https://plugins.traefik.io/create) in Go-lang.

Instead of building a Traefik plugin you could build a web service to use with ForwardAuth, so auth every request against your custom web-service enforcing limits. ([Doc](https://doc.traefik.io/traefik/middlewares/http/forwardauth/))
