Firstsawyou commented on a change in pull request #2270:
URL: https://github.com/apache/apisix/pull/2270#discussion_r494080517
##########
File path: doc/plugins/limit-req.md
##########
@@ -20,31 +20,33 @@
- [中文](../zh-cn/plugins/limit-req.md)
# Summary
+ - [Introduction](#introduction)
+ - [Attributes](#attributes)
+ - [Example](#example)
+ - [How to enable on the `route` or
`serivce`](#how-to-enable-on-the-route-or-serivce)
+ - [How to enable on the `consumer`](#how-to-enable-on-the-consumer)
+ - [Disable Plugin](#disable-plugin)
-- [**Name**](#name)
-- [**Attributes**](#attributes)
-- [**How To Enable**](#how-to-enable)
-- [**Test Plugin**](#test-plugin)
-- [**Disable Plugin**](#disable-plugin)
-
-## Name
+## Introduction
limit request rate using the "leaky bucket" method.
## Attributes
| Name | Type | Requirement | Default | Valid
| Description
|
| ------------- | ------- | ----------- | ------- |
------------------------------------------------------------------------ |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-| rate | integer | required | | [0,...]
| the specified request rate
(number per second) threshold. Requests exceeding this rate (and below `burst`)
will get delayed to conform to the rate. |
-| burst | integer | required | | [0,...]
| the number of excessive
requests per second allowed to be delayed. Requests exceeding this hard limit
will get rejected immediately. |
-| key | string | required | | ["remote_addr",
"server_addr", "http_x_real_ip", "http_x_forwarded_for"] | the user specified
key to limit the rate, now accept those as key: "remote_addr"(client's IP),
"server_addr"(server's IP), "X-Forwarded-For/X-Real-IP" in request header. |
-| rejected_code | string | optional | 503 | [200,...]
| The HTTP status code returned
when the request exceeds the threshold is rejected. The default is 503.
|
+| rate | number | required | | [0,...]
| the specified request rate
(number per second) threshold. Requests exceeding this rate (and below `burst`)
will get delayed to conform to the rate. |
+| burst | number | required | | [0,...]
| the number of excessive requests
per second allowed to be delayed. Requests exceeding this hard limit will get
rejected immediately. |
Review comment:
There are no test cases. I will not modify it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]