gpt4 book ai didi

istio - 超时和重试如何在 Istio 中协同工作?

转载 作者:行者123 更新时间:2023-12-01 23:20:00 26 4
gpt4 key购买 nike

这里是 VirtualService 的例子,同时使用了超时和重试。

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sa-logic
spec:
hosts:
- sa-logic
http:
- route:
- destination:
host: sa-logic
subset: v1
weight: 50
- destination:
host: sa-logic
subset: v2
weight: 50
timeout: 8s
retries:
attempts: 3
perTryTimeout: 3s # perTryTimeout (3s) is different from timeout above (8s)

它是如何工作的?该文档没有对此问题提供明确的答案。我有三个猜测:

  1. 超时始终为 8 秒(超时覆盖 perTryTimeout)。
  2. 超时始终为 3 秒(perTryTimeout 覆盖超时)。
  3. 初始调用的超时为 8 秒,重试的超时为 3 秒(与文档相矛盾。文档说 perTryTimeout 包括初始调用和任何重试)。
  4. 每次尝试的超时始终为 3 秒(包括初始调用),但所有尝试的总超时为 8 秒。

最佳答案

这是正确的:

  1. Timeout per try always 3s (including initial call), but the total timeout for all attempts is 8s.

它的基本意思是:

  • 如果尝试时间超过 3 秒,则将其标记为失败。

  • 最多尝试 3 次。

  • 成功尝试的总等待时间不会超过 8 秒。

perTryTimeout * 重试 不应超过全局超时。如果是这样,超出全局超时的重试尝试将被忽略。

关于istio - 超时和重试如何在 Istio 中协同工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68224451/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com