0

我正在使用大使进行外部身份验证和重新路由。我创建了一个休眠 31 秒并返回 200 的服务。我使用以下注释部署了该服务:

annotations:
getambassador.io/config: |
---
apiVersion: getambassador.io/v2
kind: Mapping
name: mapping-test-12000
namespace: test
service: test-service:12000
timeout_ms: 600000
connect_timeout_ms: 60000
prefix: /test-endpoint/
rewrite: /

我所有的 HTTP 调用都因 502 bad gateway 而失败。查看大使日志,它似乎在30秒后超时: "POST /test-endpoint/run HTTP/1.1" 0 DC 16 0 30000 - , ""insomnia/2021.7.2" "7819d615-9bdb-4f6b- a198-97f2ad89f023""""*:12000

根据 timeout_ms 设置,我期望超时为 10 分钟。如果我将 timeout_ms 的值设置在30秒以下,它似乎工作正常。

下面是特使路线:

{
"match": {
"case_sensitive": true,
"prefix": "/test-endpoint/",
"runtime_fraction": {
"default_value": {
"denominator": "HUNDRED",
"numerator": 100
},
"runtime_key": "routing.traffic_shift.cluster_test_service_12000_test"
}
},
"route": {
"cluster": "cluster_test_service_12000_test",
"cors": {
"allow_credentials": true,
"allow_headers": "",
"allow_methods": "GET, HEAD, PUT, POST, DELETE, OPTIONS",
"allow_origin_string_match": [
{
"exact": ""
}
],
"filter_enabled": {
"default_value": {
"denominator": "HUNDRED",
"numerator": 100
},
"runtime_key": "routing.cors_enabled.**"
},
"max_age": "86400"
},
"prefix_rewrite": "/",
"priority": null,
"timeout": "600.000s"
}
}

版本:大使:1.4.1 Kubernetes 环境:GKE Kubernetes 版本:1.19.5

4

0 回答 0