Skip to content

Commit

Permalink
update limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh committed Jan 20, 2025
1 parent 2b57ab0 commit f8d951c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/concepts/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ comments: true
type: tcp
metadata:
limiter.refreshInterval: 30s
limiter.scope: service
limiters:
- name: limiter-0
limits:
Expand All @@ -58,6 +59,9 @@ comments: true
`limiter.refreshInterval` (duration, default=30s)
: 设置限制器插件同步配置间隔时长。

`limiter.scope` (string)
: 设置限制器插件请求作用域。 `service` - 仅请求服务级别,`conn` - 仅请求连接级别。默认(不设置或为空)同时请求服务级别和连接级别。

### 请求速率限制

请求速率限制包括服务,IP两个级别的限速,两个级别可以组合使用。
Expand Down Expand Up @@ -381,6 +385,7 @@ comments: true

`timeout` (duration, default=0)
: 请求超时时长

## 优先级

当同时配置多个数据源时,优先级从高到低为: HTTP,redis,文件,内联。如果在不同数据源中存在相同的作用域,则优先级高的会覆盖优先级低的配置。
Expand Down
4 changes: 4 additions & 0 deletions en/docs/concepts/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This type of limiter includes three levels: service, connection and IP, the thre
type: tcp
metadata:
limiter.refreshInterval: 30s
limiter.scope: service
limiters:
- name: limiter-0
limits:
Expand All @@ -58,6 +59,9 @@ A list of configurations is specified via the `limits` option, each configuratio
`limiter.refreshInterval` (duration, default=30s)
: Limiter plugin synchronization configuration interval.

`limiter.scope` (string)
: Limiter plugin request scope. `service` - service level only, `conn` - connection level only. By default (not set or empty) both service level and connection level are requested.

### Request Rate Limiter

This type of limiter includes two levels: service and IP, the two levels can be used in combination.
Expand Down

0 comments on commit f8d951c

Please sign in to comment.