Skip to content

Commit 9be4acc

Browse files
authored
Merge pull request #29866 from howieyuen/concept-4
[zh] sync content/zh/docs/concepts/cluster-administration/flow-contro…
2 parents e6e710e + c36a610 commit 9be4acc

File tree

1 file changed

+48
-38
lines changed

1 file changed

+48
-38
lines changed

content/zh/docs/concepts/cluster-administration/flow-control.md

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ APF 特性包含几个不同的功能。
128128

129129
<!--
130130
### Priority Levels
131-
Without APF enabled, overall concurrency in
132-
the API server is limited by the `kube-apiserver` flags
133-
`--max-requests-inflight` and `--max-mutating-requests-inflight`. With APF
134-
enabled, the concurrency limits defined by these flags are summed and then the sum is divided up
135-
among a configurable set of _priority levels_. Each incoming request is assigned
136-
to a single priority level, and each priority level will only dispatch as many
131+
Without APF enabled, overall concurrency in the API server is limited by the
132+
`kube-apiserver` flags `--max-requests-inflight` and
133+
`--max-mutating-requests-inflight`. With APF enabled, the concurrency limits
134+
defined by these flags are summed and then the sum is divided up among a
135+
configurable set of _priority levels_. Each incoming request is assigned to a
136+
single priority level, and each priority level will only dispatch as many
137137
concurrent requests as its configuration allows.
138138
-->
139139
### 优先级 {#Priority-Levels}
@@ -219,8 +219,9 @@ server.
219219
220220
The Priority and Fairness feature ships with a suggested configuration that
221221
should suffice for experimentation; if your cluster is likely to
222-
experience heavy load then you should consider what configuration will work best.
223-
The suggested configuration groups requests into five priority classes:
222+
experience heavy load then you should consider what configuration will work
223+
best. The suggested configuration groups requests into five priority
224+
classes:
224225
-->
225226
## 默认值 {#defaults}
226227

@@ -418,8 +419,8 @@ to balance progress between request flows.
418419

419420
<!--
420421
The queuing configuration allows tuning the fair queuing algorithm for a
421-
priority level. Details of the algorithm can be read in the [enhancement
422-
proposal](#whats-next), but in short:
422+
priority level. Details of the algorithm can be read in the
423+
[enhancement proposal](#whats-next), but in short:
423424
-->
424425
公平排队算法支持通过排队配置对优先级微调。 可以在[增强建议](#whats-next)中阅读算法的详细信息,但总之:
425426

@@ -450,7 +451,7 @@ proposal](#whats-next), but in short:
450451
a small number of flows can dominate the apiserver. A larger `handSize` also
451452
potentially increases the amount of latency that a single high-traffic flow
452453
can cause. The maximum number of queued requests possible from a
453-
single flow is `handSize *queueLengthLimit`.
454+
single flow is `handSize * queueLengthLimit`.
454455
{{< /note >}}
455456
-->
456457
* 修改 `handSize` 允许你调整过载情况下不同流之间的冲突概率以及单个流可用的整体并发性。
@@ -459,7 +460,7 @@ proposal](#whats-next), but in short:
459460
较大的 `handSize` 使两个单独的流程发生碰撞的可能性较小(因此,一个流可以饿死另一个流),
460461
但是更有可能的是少数流可以控制 apiserver。
461462
较大的 `handSize` 还可能增加单个高并发流的延迟量。
462-
单个流中可能排队的请求的最大数量为 `handSize *queueLengthLimit`
463+
单个流中可能排队的请求的最大数量为 `handSize * queueLengthLimit`
463464
{{< /note >}}
464465

465466
<!--
@@ -628,13 +629,14 @@ poorly-behaved workloads that may be harming system health.
628629
matched the request), `priority_evel` (indicating the one to which
629630
the request was assigned), and `reason`. The `reason` label will be
630631
have one of the following values:
631-
* `queue-full`, indicating that too many requests were already
632-
queued,
633-
* `concurrency-limit`, indicating that the
634-
PriorityLevelConfiguration is configured to reject rather than
635-
queue excess requests, or
636-
* `time-out`, indicating that the request was still in the queue
637-
when its queuing time limit expired.
632+
633+
* `queue-full`, indicating that too many requests were already
634+
queued,
635+
* `concurrency-limit`, indicating that the
636+
PriorityLevelConfiguration is configured to reject rather than
637+
queue excess requests, or
638+
* `time-out`, indicating that the request was still in the queue
639+
when its queuing time limit expired.
638640
-->
639641
* `apiserver_flowcontrol_rejected_requests_total` 是一个计数器向量,
640642
记录被拒绝的请求数量(自服务器启动以来累计值),
@@ -725,6 +727,14 @@ poorly-behaved workloads that may be harming system health.
725727
记录包含执行中(不在队列中等待)请求的瞬时数量,
726728
由标签 `priority_level``flow_schema` 进一步区分。
727729

730+
<!--
731+
* `apiserver_flowcontrol_request_concurrency_in_use` is a gauge vector
732+
holding the instantaneous number of occupied seats, broken down by
733+
the labels `priority_level` and `flow_schema`.
734+
-->
735+
* `apiserver_flowcontrol_request_concurrency_in_use` 是一个规范向量,
736+
包含占用座位的瞬时数量,由标签 `priority_level``flow_schema` 进一步区分。
737+
728738
<!--
729739
* `apiserver_flowcontrol_priority_level_request_count_samples` is a
730740
histogram vector of observations of the then-current number of
@@ -835,16 +845,16 @@ poorly-behaved workloads that may be harming system health.
835845
<!--
836846
### Debug endpoints
837847
838-
When you enable the API Priority and Fairness feature,
839-
the kube-apiserver serves the following additional paths at its HTTP[S] ports.
848+
When you enable the API Priority and Fairness feature, the `kube-apiserver`
849+
serves the following additional paths at its HTTP[S] ports.
840850
-->
841851
### 调试端点 {#Debug-endpoints}
842852

843853
启用 APF 特性后, kube-apiserver 会在其 HTTP/HTTPS 端口提供以下路径:
844854

845855
<!--
846-
- `/debug/api_priority_and_fairness/dump_priority_levels` - a listing of all the priority levels and the current state of each.
847-
You can fetch like this:
856+
- `/debug/api_priority_and_fairness/dump_priority_levels` - a listing of
857+
all the priority levels and the current state of each. You can fetch like this:
848858
-->
849859
- `/debug/api_priority_and_fairness/dump_priority_levels` ——
850860
所有优先级及其当前状态的列表。你可以这样获取:
@@ -856,7 +866,7 @@ You can fetch like this:
856866
<!-- The output is similar to this: -->
857867
输出类似于:
858868

859-
```
869+
```none
860870
PriorityLevelName, ActiveQueues, IsIdle, IsQuiescing, WaitingRequests, ExecutingRequests,
861871
workload-low, 0, true, false, 0, 0,
862872
global-default, 0, true, false, 0, 0,
@@ -868,8 +878,8 @@ You can fetch like this:
868878
```
869879

870880
<!--
871-
- `/debug/api_priority_and_fairness/dump_queues` - a listing of all the queues and their current state.
872-
You can fetch like this:
881+
- `/debug/api_priority_and_fairness/dump_queues` - a listing of all the
882+
queues and their current state. You can fetch like this:
873883
-->
874884
- `/debug/api_priority_and_fairness/dump_queues` —— 所有队列及其当前状态的列表。
875885
你可以这样获取:
@@ -881,7 +891,7 @@ You can fetch like this:
881891
<!-- The output is similar to this: -->
882892
输出类似于:
883893

884-
```
894+
```none
885895
PriorityLevelName, Index, PendingRequests, ExecutingRequests, VirtualStart,
886896
workload-high, 0, 0, 0, 0.0000,
887897
workload-high, 1, 0, 0, 0.0000,
@@ -892,8 +902,8 @@ You can fetch like this:
892902
```
893903

894904
<!--
895-
- `/debug/api_priority_and_fairness/dump_requests` - a listing of all the requests that are currently waiting in a queue.
896-
You can fetch like this:
905+
- `/debug/api_priority_and_fairness/dump_requests` - a listing of all the requests
906+
that are currently waiting in a queue. You can fetch like this:
897907
-->
898908
- `/debug/api_priority_and_fairness/dump_requests` ——当前正在队列中等待的所有请求的列表。
899909
你可以这样获取:
@@ -905,15 +915,15 @@ You can fetch like this:
905915
<!-- The output is similar to this: -->
906916
输出类似于:
907917

908-
```
918+
```none
909919
PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime,
910920
exempt, <none>, <none>, <none>, <none>, <none>,
911921
system, system-nodes, 12, 0, system:node:127.0.0.1, 2020-07-23T15:26:57.179170694Z,
912922
```
913923

914924
<!--
915-
In addition to the queued requests,
916-
the output includes one phantom line for each priority level that is exempt from limitation.
925+
In addition to the queued requests, the output includes one phantom line
926+
for each priority level that is exempt from limitation.
917927
-->
918928
针对每个优先级别,输出中还包含一条虚拟记录,对应豁免限制。
919929

@@ -925,8 +935,9 @@ You can fetch like this:
925935
```
926936

927937
<!-- The output is similar to this: -->
938+
928939
输出类似于:
929-
```
940+
```none
930941
PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime, UserName, Verb, APIPath, Namespace, Name, APIVersion, Resource, SubResource,
931942
system, system-nodes, 12, 0, system:node:127.0.0.1, 2020-07-23T15:31:03.583823404Z, system:node:127.0.0.1, create, /api/v1/namespaces/scaletest/configmaps,
932943
system, system-nodes, 12, 1, system:node:127.0.0.1, 2020-07-23T15:31:03.594555947Z, system:node:127.0.0.1, create, /api/v1/namespaces/scaletest/configmaps,
@@ -935,14 +946,13 @@ You can fetch like this:
935946
## {{% heading "whatsnext" %}}
936947

937948
<!--
938-
For background information on design details for API priority and fairness, see the
939-
[enhancement proposal](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190228-priority-and-fairness.md).
940-
You can make suggestions and feature requests via
941-
[SIG API Machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery)
949+
For background information on design details for API priority and fairness, see
950+
the [enhancement proposal](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness).
951+
You can make suggestions and feature requests via [SIG API Machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery)
942952
or the feature's [slack channel](https://kubernetes.slack.com/messages/api-priority-and-fairness).
943953
-->
944954
有关API优先级和公平性的设计细节的背景信息,
945-
请参阅[增强建议](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190228-priority-and-fairness.md)
955+
请参阅[增强建议](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness)
946956
你可以通过 [SIG APIMachinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery/)
947957
或特性的 [Slack 频道](https://kubernetes.slack.com/messages/api-priority-and-fairness/)
948958
提出建议和特性请求。

0 commit comments

Comments
 (0)