@@ -128,12 +128,12 @@ APF 特性包含几个不同的功能。
128
128
129
129
<!--
130
130
### 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
137
137
concurrent requests as its configuration allows.
138
138
-->
139
139
### 优先级 {#Priority-Levels}
@@ -219,8 +219,9 @@ server.
219
219
220
220
The Priority and Fairness feature ships with a suggested configuration that
221
221
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:
224
225
-->
225
226
## 默认值 {#defaults}
226
227
@@ -418,8 +419,8 @@ to balance progress between request flows.
418
419
419
420
<!--
420
421
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:
423
424
-->
424
425
公平排队算法支持通过排队配置对优先级微调。 可以在[ 增强建议] ( #whats-next ) 中阅读算法的详细信息,但总之:
425
426
@@ -450,7 +451,7 @@ proposal](#whats-next), but in short:
450
451
a small number of flows can dominate the apiserver. A larger `handSize` also
451
452
potentially increases the amount of latency that a single high-traffic flow
452
453
can cause. The maximum number of queued requests possible from a
453
- single flow is `handSize *queueLengthLimit`.
454
+ single flow is `handSize * queueLengthLimit`.
454
455
{{< /note >}}
455
456
-->
456
457
* 修改 ` handSize ` 允许你调整过载情况下不同流之间的冲突概率以及单个流可用的整体并发性。
@@ -459,7 +460,7 @@ proposal](#whats-next), but in short:
459
460
较大的 ` handSize ` 使两个单独的流程发生碰撞的可能性较小(因此,一个流可以饿死另一个流),
460
461
但是更有可能的是少数流可以控制 apiserver。
461
462
较大的 ` handSize ` 还可能增加单个高并发流的延迟量。
462
- 单个流中可能排队的请求的最大数量为 ` handSize *queueLengthLimit ` 。
463
+ 单个流中可能排队的请求的最大数量为 ` handSize * queueLengthLimit ` 。
463
464
{{< /note >}}
464
465
465
466
<!--
@@ -628,13 +629,14 @@ poorly-behaved workloads that may be harming system health.
628
629
matched the request), `priority_evel` (indicating the one to which
629
630
the request was assigned), and `reason`. The `reason` label will be
630
631
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.
638
640
-->
639
641
* ` apiserver_flowcontrol_rejected_requests_total ` 是一个计数器向量,
640
642
记录被拒绝的请求数量(自服务器启动以来累计值),
@@ -725,6 +727,14 @@ poorly-behaved workloads that may be harming system health.
725
727
记录包含执行中(不在队列中等待)请求的瞬时数量,
726
728
由标签 ` priority_level ` 和 ` flow_schema ` 进一步区分。
727
729
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
+
728
738
<!--
729
739
* `apiserver_flowcontrol_priority_level_request_count_samples` is a
730
740
histogram vector of observations of the then-current number of
@@ -835,16 +845,16 @@ poorly-behaved workloads that may be harming system health.
835
845
<!--
836
846
### Debug endpoints
837
847
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.
840
850
-->
841
851
### 调试端点 {#Debug-endpoints}
842
852
843
853
启用 APF 特性后, kube-apiserver 会在其 HTTP/HTTPS 端口提供以下路径:
844
854
845
855
<!--
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:
848
858
-->
849
859
- ` /debug/api_priority_and_fairness/dump_priority_levels ` ——
850
860
所有优先级及其当前状态的列表。你可以这样获取:
@@ -856,7 +866,7 @@ You can fetch like this:
856
866
<!-- The output is similar to this: -->
857
867
输出类似于:
858
868
859
- ```
869
+ ``` none
860
870
PriorityLevelName, ActiveQueues, IsIdle, IsQuiescing, WaitingRequests, ExecutingRequests,
861
871
workload-low, 0, true, false, 0, 0,
862
872
global-default, 0, true, false, 0, 0,
@@ -868,8 +878,8 @@ You can fetch like this:
868
878
```
869
879
870
880
<!--
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:
873
883
-->
874
884
- ` /debug/api_priority_and_fairness/dump_queues ` —— 所有队列及其当前状态的列表。
875
885
你可以这样获取:
@@ -881,7 +891,7 @@ You can fetch like this:
881
891
<!-- The output is similar to this: -->
882
892
输出类似于:
883
893
884
- ```
894
+ ``` none
885
895
PriorityLevelName, Index, PendingRequests, ExecutingRequests, VirtualStart,
886
896
workload-high, 0, 0, 0, 0.0000,
887
897
workload-high, 1, 0, 0, 0.0000,
@@ -892,8 +902,8 @@ You can fetch like this:
892
902
```
893
903
894
904
<!--
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:
897
907
-->
898
908
- ` /debug/api_priority_and_fairness/dump_requests ` ——当前正在队列中等待的所有请求的列表。
899
909
你可以这样获取:
@@ -905,15 +915,15 @@ You can fetch like this:
905
915
<!-- The output is similar to this: -->
906
916
输出类似于:
907
917
908
- ```
918
+ ``` none
909
919
PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime,
910
920
exempt, <none>, <none>, <none>, <none>, <none>,
911
921
system, system-nodes, 12, 0, system:node:127.0.0.1, 2020-07-23T15:26:57.179170694Z,
912
922
```
913
923
914
924
<!--
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.
917
927
-->
918
928
针对每个优先级别,输出中还包含一条虚拟记录,对应豁免限制。
919
929
@@ -925,8 +935,9 @@ You can fetch like this:
925
935
```
926
936
927
937
<!-- The output is similar to this: -->
938
+
928
939
输出类似于:
929
- ```
940
+ ``` none
930
941
PriorityLevelName, FlowSchemaName, QueueIndex, RequestIndexInQueue, FlowDistingsher, ArriveTime, UserName, Verb, APIPath, Namespace, Name, APIVersion, Resource, SubResource,
931
942
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,
932
943
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:
935
946
## {{% heading "whatsnext" %}}
936
947
937
948
<!--
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)
942
952
or the feature's [slack channel](https://kubernetes.slack.com/messages/api-priority-and-fairness).
943
953
-->
944
954
有关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 ) 。
946
956
你可以通过 [ SIG APIMachinery] ( https://github.com/kubernetes/community/tree/master/sig-api-machinery/ )
947
957
或特性的 [ Slack 频道] ( https://kubernetes.slack.com/messages/api-priority-and-fairness/ )
948
958
提出建议和特性请求。
0 commit comments