更新时间:2024-09-29 GMT+08:00
请求超时
开启请求超时,服务访问超时系统会自动处理,快速失败,避免资源锁定和请求卡顿。
YAML设置如下:
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-productpage-rule
namespace: istio-system
spec:
hosts:
- productpage.prod.svc.cluster.local
http:
- timeout: 5s # 配置请求超时参数
route:
- destination:
host: productpage.prod.svc.cluster.local
请根据实际需求调整配置参数。
父主题: 服务路由