当前位置:网站首页>In-depth understanding of timeout settings for Istio traffic management
In-depth understanding of timeout settings for Istio traffic management
2022-08-05 10:17:00 【InfoQ】
环境准备
httpbin
kubectl apply -f samples/httpbin/httpbin.yaml
sleep
kubectl apply -f samples/sleep/sleep.yaml
httpbin
sleep
设置超时时间
sleep
httpbin
export SLEEP_POD=$(kubectl get pods -l app=sleep -o 'jsonpath={.items[0].metadata.name}')
kubectl exec "$SLEEP_POD" -c sleep -- time curl -o /dev/null -sS -w "%{http_code}\n" http://httpbin.org/delay/5
200
real 0m 5.69s
user 0m 0.00s
sys 0m 0.00s
httpbin
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: httpbin
spec:
hosts:
- httpbin
http:
- route:
- destination:
host: httpbin
timeout: 3s
EOF
504
real 0m 3.01s
user 0m 0.00s
sys 0m 0.00s
httpbin
查看Envoy日志
sleep
kubectl logs -l app=sleep -c istio-proxy
sleep
httpbin
{
"authority": "httpbin:8000",
"bytes_received": 0,
"bytes_sent": 24,
"connection_termination_details": null,
"downstream_local_address": "172.24.146.239:8000",
"downstream_remote_address": "172.24.158.25:40384",
"duration": 3001,
"method": "GET",
"path": "/delay/5",
"protocol": "HTTP/1.1",
"request_id": "5ef38816-7f49-48c8-9627-2416e1716293",
"requested_server_name": null,
"response_code": 504,
"response_code_details": "upstream_response_timeout",
"response_flags": "UT",
"route_name": null,
"start_time": "2022-07-01T09:40:13.882Z",
"upstream_cluster": "outbound|8000||httpbin.onemore.svc.cluster.local",
"upstream_host": "172.24.158.96:80",
"upstream_local_address": "172.24.158.25:32846",
"upstream_service_time": null,
"upstream_transport_failure_reason": null,
"user_agent": "curl/7.81.0-DEV",
"x_forwarded_for": null
}
response_flags
UT
sleep
httpbin
httpbin
kubectl logs -l app=httpbin -c istio-proxy
httpbin
sleep
{
"authority": "httpbin:8000",
"bytes_received": 0,
"bytes_sent": 0,
"connection_termination_details": null,
"downstream_local_address": "172.24.158.96:80",
"downstream_remote_address": "172.24.158.25:32846",
"duration": 2997,
"method": "GET",
"path": "/delay/5",
"protocol": "HTTP/1.1",
"request_id": "5ef38816-7f49-48c8-9627-2416e1716293",
"requested_server_name": "outbound_.8000_._.httpbin.onemore.svc.cluster.local",
"response_code": 0,
"response_code_details": "downstream_remote_disconnect",
"response_flags": "DC",
"route_name": "default",
"start_time": "2022-07-01T09:40:13.885Z",
"upstream_cluster": "inbound|80||",
"upstream_host": "172.24.158.96:80",
"upstream_local_address": "127.0.0.6:35701",
"upstream_service_time": null,
"upstream_transport_failure_reason": null,
"user_agent": "curl/7.81.0-DEV",
"x_forwarded_for": null
}
response_flags
DC
sleep
深入分析
httpbin
httpbin
httpbin
sleep
清理
kubectl delete virtualservice httpbin
kubectl delete -f samples/httpbin/httpbin.yaml
kubectl delete -f samples/sleep/sleep.yaml
边栏推荐
- egg框架使用(一)
- NowCoderTOP35-40——持续更新ing
- 【MindSpore Easy-Diantong Robot-01】You may have seen many knowledge quiz robots, but this one is a bit different
- 还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!
- 攻防世界-PWN-new_easypwn
- [强网杯2022]WP-UM
- Development common manual link sharing
- 使用工具类把对象中的null值转换为空字符串(集合也可以使用)
- 语音社交软件开发——充分发挥其价值
- 第五章:activiti流程分流判断,判断走不同的任务节点
猜你喜欢
首次去中心化抢劫?近2亿美元损失:跨链桥Nomad 被攻击事件分析
一文道清什么是SPL
The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
leetcode: 529. 扫雷游戏
产品太多了,如何实现一次登录多产品互通?
19. Server-side session technology Session
[Strong Net Cup 2022] WP-UM
【AGC】增长服务1-远程配置示例
5. Deploy the web project to the cloud server
单片机:温度控制DS18B20
随机推荐
egg框架使用(一)
The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
NowCoderTOP35-40 - continuous update ing
MySQL transactions
Development common manual link sharing
你最隐秘的性格在哪?
Go编译原理系列6(类型检查)
哪位大佬有20年4月或者1月的11G GI和ojvm补丁呀,帮忙发下?
还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!
企业的数字化转型到底是否可以买来?
产品太多了,如何实现一次登录多产品互通?
一文道清什么是SPL
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
【AGC】增长服务1-远程配置示例
Introduction to SD NAND Flash!
蚁剑webshell动态加密连接分析与实践
Analysis and practice of antjian webshell dynamic encrypted connection
浅析WSGI协议
【Office】Microsoft Office下载地址合集(微软官方原版离线安装下载)
MySQL data view