当前位置:网站首页>深入理解 Istio 流量管理的超时时间设置
深入理解 Istio 流量管理的超时时间设置
2022-08-05 10:09: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
边栏推荐
- Meteorological data processing example - matlab string cutting matching and R language date matching (data splicing)
- 什么是CRM决策分析管理?
- The technological achievements of Shanghai Konan were selected into the "2021 Shanghai Network Security Industry Innovation Research Achievement Catalog" by the Municipal Commission of Economy and Inf
- 一个栈的输入序列为1 2 3 4 5 的出站顺序的理解
- ffmpeg drawtext 添加文本水印
- IO流篇 -- 基于io流实现文件夹拷贝(拷贝子文件夹及子文件夹内文件)满满的干货
- Introduction to SD NAND Flash!
- Jenkins使用手册(2) —— 软件配置
- Technical dry goods | Hausdorff distance for image segmentation based on MindSpore
- 百年北欧奢华家电品牌ASKO智能三温区酒柜臻献七夕,共品珍馐爱意
猜你喜欢
three物体围绕一周呈球形排列
Complete image segmentation efficiently based on MindSpore and realize Dice!
SD NAND Flash简介!
Analysis and practice of antjian webshell dynamic encrypted connection
dotnet OpenXML parsing PPT charts Getting started with area charts
皕杰报表的下拉框联动
教你本地编译运行一个IDEA插件,在IDEA里聊天、下棋、斗地主!
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
什么是CRM决策分析管理?
The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!
随机推荐
Oracle临时表空间作用
The difference between find, matches, lookingAt matching strings in matcher
手写柯里化 - toString 理解
MySQL事务
Introduction to SD NAND Flash!
Development common manual link sharing
首次去中心化抢劫?近2亿美元损失:跨链桥Nomad 被攻击事件分析
19. Server-side session technology Session
[Office] Collection of Microsoft Office download addresses (offline installation and download of Microsoft's official original version)
three物体围绕一周呈球形排列
Egg framework usage (1)
一个栈的输入序列为1 2 3 4 5 的出站顺序的理解
第五章:多线程通信—wait和notify
哪位大佬有20年4月或者1月的11G GI和ojvm补丁呀,帮忙发下?
开源一夏|OpenHarmony如何查询设备类型(eTS)
蚁剑webshell动态加密连接分析与实践
Advanced usage of C language
Our Web3 Entrepreneurship Project, Yellow
MySQL data view
QSS 选择器