<commit_before>---
title: Plugins - Rate Limiting
sitemap: true
show_faq: true
layout: page
id: page-plugin
header_title: Rate Limiting
header_icon: /assets/images/icons/plugins/rate-limiting.png
header_caption: utilities
breadcrumbs:
  Plugins: /plugins
  Rate Limiting: /plugins/rate-limiting/
---

---

#### Rate limit how many HTTP requests a developer can make in a given period of seconds, minutes, hours, days months or years. If the API has no authentication layer, the **Client IP** address will be used, otherwise the consume will be used if an authentication plugin has been configured.

---

## Installation

<!---
Make sure every Kong server in your cluster has the required dependency by executing:

```bash
$ kong install ratelimiting
```
-->

Add the plugin to the list of available plugins on every Kong server in your cluster by editing the [kong.yml](/docs/{{site.latest}}/getting-started/configuration) configuration file

```yaml
plugins_available:
  - ratelimiting
```

Every node in the Kong cluster should have the same `plugins_available` property value.

## Configuration

Configuring the plugin is straightforward, you can add it on top of an [API](/docs/{{site.latest}}/api/#api-object) (or [Consumer](/docs/{{site.latest}}/api/#consumer-object)) by executing the following request on your Kong server:

```bash
curl -d "name=ratelimiting&api_id=API_ID&value.limit=1000&value.period=hour" http://kong:8001/plugins_configurations/
```

| parameter                    | description                                                |
|------------------------------|------------------------------------------------------------|
| name                         | The name of the plugin to use, in this case: `tcplog`   |
| api_id                       | The API ID that this plugin configuration will target             |
| *consumer_id*             | Optionally the CONSUMER ID that this plugin configuration will target |
| `value.limit`           | The amount of HTTP requests the developer can make in the given period of time |
| `value.period`           | Can be one between: `second`, `minute`, `hour`, `day`, `month`, `year` |
<commit_msg>Fixes typo in rate-limiting.md<commit_after>---
title: Plugins - Rate Limiting
sitemap: true
show_faq: true
layout: page
id: page-plugin
header_title: Rate Limiting
header_icon: /assets/images/icons/plugins/rate-limiting.png
header_caption: utilities
breadcrumbs:
  Plugins: /plugins
  Rate Limiting: /plugins/rate-limiting/
---

---

#### Rate limit how many HTTP requests a developer can make in a given period of seconds, minutes, hours, days months or years. If the API has no authentication layer, the **Client IP** address will be used, otherwise the consume will be used if an authentication plugin has been configured.

---

## Installation

<!---
Make sure every Kong server in your cluster has the required dependency by executing:

```bash
$ kong install ratelimiting
```
-->

Add the plugin to the list of available plugins on every Kong server in your cluster by editing the [kong.yml](/docs/{{site.latest}}/getting-started/configuration) configuration file

```yaml
plugins_available:
  - ratelimiting
```

Every node in the Kong cluster should have the same `plugins_available` property value.

## Configuration

Configuring the plugin is straightforward, you can add it on top of an [API](/docs/{{site.latest}}/api/#api-object) (or [Consumer](/docs/{{site.latest}}/api/#consumer-object)) by executing the following request on your Kong server:

```bash
curl -d "name=ratelimiting&api_id=API_ID&value.limit=1000&value.period=hour" http://kong:8001/plugins_configurations/
```

| parameter                    | description                                                |
|------------------------------|------------------------------------------------------------|
| name                         | The name of the plugin to use, in this case: `ratelimiting`   |
| api_id                       | The API ID that this plugin configuration will target             |
| *consumer_id*             | Optionally the CONSUMER ID that this plugin configuration will target |
| `value.limit`           | The amount of HTTP requests the developer can make in the given period of time |
| `value.period`           | Can be one between: `second`, `minute`, `hour`, `day`, `month`, `year` |

{'fraction_non_alphanumeric': 0.13810506997017666, 'fraction_numerical': 0.003670566643725625, 'mean_word_length': 2.688663282571912, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '637378', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1102, 'n_words': 453}