@@ -121,6 +121,57 @@ API Priority and Fairness feature.
121
121
-->
122
122
命令行标志 ` --enable-priority-fairness=false ` 将彻底禁用 APF 特性。
123
123
124
+ <!--
125
+ ## Recursive server scenarios
126
+
127
+ API Priority and Fairness must be used carefully in recursive server
128
+ scenarios. These are sccenarios in which some server A, while serving
129
+ a request, issues a subsidiary request to some server B. Perhaps
130
+ server B might even make a further subsidiary call back to server
131
+ A. In situations where Priority and Fairness control is applied to
132
+ both the original request and some subsidiary ones(s), no matter how
133
+ deep in the recursion, there is a danger of priority inversions and/or
134
+ deadlocks.
135
+ -->
136
+ ## 递归服务器场景 {#Recursive server scenarios}
137
+
138
+ 在递归服务器场景中,必须谨慎使用 API 优先级和公平性。这些场景指的是服务器 A 在处理一个请求时,
139
+ 会向服务器 B 发出一个辅助请求。服务器 B 可能会进一步向服务器 A 发出辅助请求。
140
+ 当优先级和公平性控制同时应用于原始请求及某些辅助请求(无论递归多深)时,存在优先级反转和/或死锁的风险。
141
+
142
+ <!--
143
+ One example of recursion is when the `kube-apiserver` issues an
144
+ admission webhook call to server B, and while serving that call,
145
+ server B makes a further subsidiary request back to the
146
+ `kube-apiserver`. Another example of recursion is when an `APIService`
147
+ object directs the `kube-apiserver` to delegate requests about a
148
+ certain API group to a custom external server B (this is one of the
149
+ things called "aggregation").
150
+ -->
151
+ 递归的一个例子是 ` kube-apiserver ` 向服务器 B 发出一个准入 Webhook 调用,
152
+ 而在处理该调用时,服务器 B 进一步向 ` kube-apiserver ` 发出一个辅助请求。
153
+ 另一个递归的例子是,某个 ` APIService ` 对象指示 ` kube-apiserver `
154
+ 将某个 API 组的请求委托给自定义的外部服务器 B(这被称为"聚合")。
155
+
156
+ <!--
157
+ When the original request is known to belong to a certain priority
158
+ level, and the subsidiary controlled requests are classified to higher
159
+ priority levels, this is one possible solution. When the original
160
+ requests can belong to any priority level, the subsidiary controlled
161
+ requests have to be exempt from Priority and Fairness limitation. One
162
+ way to do that is with the objects that configure classification and
163
+ handling, discussed below. Another way is to disable Priority and
164
+ Fairness on server B entirely, using the techniques discussed above. A
165
+ third way, which is the simplest to use when server B is not
166
+ `kube-apisever`, is to build server B with Priority and Fairness
167
+ disabled in the code.
168
+ -->
169
+ 当原始请求被确定为属于某个特定优先级别时,将辅助请求分类为更高的优先级别是一个可行的解决方案。
170
+ 当原始请求可能属于任何优先级时,辅助受控请求必须免受优先级和公平性限制。
171
+ 一种实现方法是使用下文中讨论的配置分类和处理的对象。
172
+ 另一种方法是采用前面提到的技术,在服务器 B 上完全禁用优先级和公平性。第三种方法是,
173
+ 当服务器 B 不是 ` kube-apiserver ` 时,最简单的做法是在服务器 B 的代码中禁用优先级和公平性。
174
+
124
175
<!--
125
176
## Concepts
126
177
0 commit comments