This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
如果后端服务器响应超时请求重试
请求重试可用于另一种情况,即如果后端服务器需要更多时间来响应请求,设备将在超时时间执行重新负载平衡,然后将请求转发到下一个可用服务器。
后端服务器响应超时时请求重试的工作原理
下图显示了组件之间的交互:
- 该过程首先在设备上启用 appqoe 功能。
- appqoe 配置具有 “retryonTimeout” 参数,以毫秒为单位。
- 当设备发送请求并且服务器需要更多时间来响应时间时,设备将根据配置的超时 值执行重新负载平衡。设备将重置连接、选择其他服务并转发请求,而不是等待服务器响应。
- 负载平衡虚拟服务器收到响应后,设备将响应转发给客户端。超时参数的使用可防止设备继续等待服务器响应,从而导致 RTT 增加。
- 如果可用的后端服务器等于或小于重试计数,如果所有服务器都超时 请求,则设备将响应 500 个内部服务器错误。考虑一个具有五台可用服务器且重试计数设置为 6 台的场景。如果所有五台服务器都超时请求,则设备将向客户端返回 500 个内部服务器错误。
- 同样,如果后端服务器的数量超过重试计数,如果后端服务器在请求时超时,则设备将一直等待最后一个服务,直到服务器发出响应或客户端空闲连接超时为止。考虑一个包含三台后端服务器并将重试计数设置为两台的场景。如果所有三台服务器都在请求时超时,设备将一直等待第三项服务,直到服务器发出响应或客户端空闲连接超时为止。
在后端服务器响应超时时配置请求重试(GET 和 POST 方法)
要在超时时为 GET 方法配置请求重试,必须完成以下步骤。
- 启用 appqoe
- 配置 appqoe 操作
- 添加 appqoe 策略
- 将 appqoe 策略绑定 到负载平衡虚拟服务器
注意 : 请求超时时重试场景也适用于 POST 方法。
启用 appqoe
在命令提示符下,键入:
enable ns feature appqoe
为超时添加 appqoe 操作
您必须将 appqoe 操作配置为在超时时重试并定义重试次数。
在命令提示符下,键入:
add appqoe action <name> -retryOnTimeout <msecs> -numRetries <positive_integer>
示例:
add appqoe action appact1 -retryOnTimeout 35 –numRetries 5
添加 appqoe 策略
要实施 appqoe,您必须配置 appqoe 策略以定义如何对连接进行排队。
在命令提示符下,键入:
add appqoe policy <name> -rule <rule> -action <name>
示例:
add appqoe policy timeout_policy -rule http.req.method.eq(get) -action appact1
将 appqoe 策略绑定到负载平衡虚拟服务器
当后端服务器需要很长时间才能响应并且希望负载平衡虚拟服务器将请求转发到下一个可用服务时,必须将 appqoe 策略绑定到平衡虚拟服务器。
在命令提示符下,键入:
bind lb vserver <name> ((<serviceName> (-policyName <string> [-priority <positive_integer>] [-gotoPriorityExpression <expression>] [-type ( REQUEST | RESPONSE )]
示例:
bind lb vserver v1 -policyName timeout_policy -type REQUEST -priority 1
使用 Citrix ADC GUI 配置 AppQoE 策略以在超时时重新平衡负载
- 导航到 AppExpert > AppQoE > 策略。
- 在“AppQoE 策略”页中,单击“添加”。
-
在 “ 创建 AppQoE 策略 ” 页面中,设置以下参数:
a. 名称。AppQoE 策略名称 b. 操作。添加或编辑操作。要创建新操作,请参阅创建 AppQoE 操作部分。 c. 表达式。选择或输入 “http.req.method.eq (get)” 策略表达式。
- 单击创建和关闭。
使用 Citrix ADC GUI 为请求重试配置 AppQoE 操作
- 导航到 AppExpert > AppQoE > 操作。
- 在 AppQoE 操作 页面中,单击 添加。
- 在 “ 创建 AppQoE 操作 ” 页面中,为后端服务器响应超时时重试设置以下参数: a. 在超时时重试。 在向后端服务器发送请求时,根据请求超时重试(毫秒)。
- 单击创建和关闭。
共享
共享
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.