Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh committed Nov 15, 2024
1 parent 450fffd commit e068903
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/concepts/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,24 @@ chains:
- name: hop-0
nodes:
- name: node-0
addr: :0
interface: eth0
connector:
type: virtual
dialer:
type: virtual
- name: node-1
addr: :0
interface: eth1
connector:
type: virtual
# metadata:
# action: reject
dialer:
type: virtual
```

这里node-0和node-1为直连节点,当主机具有[多个网络出口](../tutorials/multi-homed.md)时,可以通过`interface`参数为每个节点指定不同的网络出口,从而达到网络出口级别的负载均衡。

也可以通过设置`connector.metadata.action`为`reject`来拒绝所有连接。

!!! caution "限制"
如果节点的数据通道使用UDP协议,例如QUIC, KCP等,则此节点只能用于转发链第一层级。
7 changes: 7 additions & 0 deletions docs/concepts/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ comments: true
type: auto
listener:
type: tcp
metadata:
limiter.refreshInterval: 30s
limiters:
- name: limiter-0
limits:
Expand All @@ -53,6 +55,9 @@ comments: true

* 出站速率(Output):服务发送数据的速率(每秒流量),单位同入站速率。出站速率可选,0或负值代表无限制。

`limiter.refreshInterval` (duration, default=30s)
: 设置限制器插件同步配置间隔时长。

### 请求速率限制

请求速率限制包括服务,IP两个级别的限速,两个级别可以组合使用。
Expand Down Expand Up @@ -480,6 +485,8 @@ services:
handler:
type: http
limiter: limiter-0
metadata:
limiter.refreshInterval: 30s
listener:
type: tcp
limiters:
Expand Down
6 changes: 4 additions & 2 deletions en/docs/concepts/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,24 @@ If the service does not need to use an upper-stream proxy, a special virtual nod
- name: hop-0
nodes:
- name: node-0
addr: :0
interface: eth0
connector:
type: virtual
dialer:
type: virtual
- name: node-1
addr: :0
interface: eth1
connector:
type: virtual
# metadata:
# action: reject
dialer:
type: virtual
```

Here node-0 and node-1 are virtual nodes. When the host is [multi-homed] (../tutorials/multi-homed.md), you can specify different interfaces for each node through the `interface` parameter, so that achieve load balancing at the network egress level.

You can also reject all connections by setting `connector.metadata.action` to `reject`.

!!! caution "Limitation"
If the data channel of the node uses the UDP protocol, such as QUIC, KCP, etc., this node can only be used for the first level of the forwarding chain.
5 changes: 5 additions & 0 deletions en/docs/concepts/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ This type of limiter includes three levels: service, connection and IP, the thre
type: auto
listener:
type: tcp
metadata:
limiter.refreshInterval: 30s
limiters:
- name: limiter-0
limits:
Expand All @@ -53,6 +55,9 @@ A list of configurations is specified via the `limits` option, each configuratio

* Output: The rate at which the service sends data (per second), in the same unit as the input rate. The output rate is optional, zero, negative value or not set means unlimited.

`limiter.refreshInterval` (duration, default=30s)
: Limiter plugin synchronization configuration interval.

### 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 e068903

Please sign in to comment.