当前位置:网站首页>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
边栏推荐
- Custom filters and interceptors implement ThreadLocal thread closure
- Which big guy has the 11G GI and ojvm patches in April or January 2020, please help?
- FPGA:基础入门LED灯闪烁
- 多线程(进阶) - 2.5w字总结
- egg框架使用(二)
- js劫持数组push方法
- 基于MindSpore高效完成图像分割,实现Dice!
- 茄子科技CEO仇俊:以用户为中心,做用户真正需要的产品
- The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
- 浅析WSGI协议
猜你喜欢
Egg framework usage (1)
STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
JS逆向入门学习之回收商网,手机号码简易加密解析
The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
After Keil upgrades to AC6, what changes?
Create a Dapp, why choose Polkadot?
hcip BGP enhancement experiment
【 temperature warning program DE development 】 event driven model instance
深入理解 Istio 流量管理的超时时间设置
Jenkins使用手册(2) —— 软件配置
随机推荐
Jenkins manual (2) - software configuration
【MindSpore易点通机器人-01】你也许见过很多知识问答机器人,但这个有点不一样
百年北欧奢华家电品牌ASKO智能三温区酒柜臻献七夕,共品珍馐爱意
语音社交软件开发——充分发挥其价值
uniapp connect ibeacon
2022 Huashu Cup Mathematical Modeling Question A Optimization Design Ideas for Ring Oscillators Code Sharing
leetcode: 529. 扫雷游戏
uniapp 连接ibeacon
Advanced usage of C language
Microservice Technology Stack
Getting started with Polkadot parachain development, this article is enough
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
第九章:activit内置用户组设计与组任务分配和IdentityService接口的使用
MySQL transactions
JS逆向入门学习之回收商网,手机号码简易加密解析
Introduction to SD NAND Flash!
Data Middle Office Construction (10): Data Security Management
Keil升级到AC6后,到底有哪些变化?
第三章 : redis数据结构种类
2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题