# Trying to understand the Rate Limit plugins 'limit\_by: credential' configuration

**URL:** <https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885>\
**Category:** Questions\
**Created:** [March 30, 2020, 2:21am UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885 "2020-03-30T02:21:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/colin/32/1539_2.png) [@colin](https://discuss.konghq.com/u/colin)\
**Post date:** [March 30, 2020, 2:21am UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885/1 "2020-03-30T02:21:56Z")

</div>

I’m a bit confused.

With the Rate Limiting plugin, how exactly does the `config.limit_by: credential` configuration work?

If I enable the plugin on a consumer with multiple api keys (via the key-auth plugin) what effect does setting the `config.limit_by` configuration to `credential` have?

thanks.

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [March 30, 2020, 4:42pm UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885/2 "2020-03-30T16:42:40Z")

</div>

> [@colin](#):
>
> If I enable the plugin on a consumer with multiple api keys (via the key-auth plugin) what effect does setting the `config.limit_by` configuration to `credential` have?

Each credential will get the limit you have set. `consumer` on the other hand, will limit based on each consumer, no matter which credential was used.

---

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/colin/32/1539_2.png) [@colin](https://discuss.konghq.com/u/colin)\
**Post date:** [March 30, 2020, 11:18pm UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885/3 "2020-03-30T23:18:54Z")

</div>

Ah. I understand now. Thank you.

@hbagdi I take it there isn’t currently a way to set different limits to individual keys?

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [March 31, 2020, 9:25pm UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885/4 "2020-03-31T21:25:48Z")

</div>

> [@colin](#):
>
> @hbagdi I take it there isn’t currently a way to set different limits to individual keys?

You can create multiple consumers, each with one key and then set different limits for each consumer.

---

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/colin/32/1539_2.png) [@colin](https://discuss.konghq.com/u/colin)\
**Post date:** [March 31, 2020, 11:02pm UTC](https://discuss.konghq.com/t/trying-to-understand-the-rate-limit-plugins-limit-by-credential-configuration/5885/5 "2020-03-31T23:02:34Z")

</div>

> You can create multiple consumers, each with one key and then set different limits for each consumer.

Hadn’t thought of mananging it like that. Thanks again. 👍
