当前位置:网站首页>深入理解 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
边栏推荐
猜你喜欢
华为轻量级神经网络架构GhostNet再升级,GPU上大显身手的G-GhostNet(IJCV22)
Pytorch深度学习快速入门教程 -- 土堆教程笔记(三)
MySQL advanced (twenty-seven) database index principle
egg框架使用(一)
First Decentralized Heist?Loss of nearly 200 million US dollars: analysis of the attack on the cross-chain bridge Nomad
Tanabata romantic date without overtime, RPA robot helps you get the job done
C语言的高级用法
【AGC】增长服务1-远程配置示例
STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
告白数字化转型时代:麦聪软件以最简单的方式让企业把数据用起来
随机推荐
Why are RELTABLESPACE values 0 for many tables displayed in sys_class?
语音社交软件开发——充分发挥其价值
Oracle 19.3 restart 环境
leetcode: 529. 扫雷游戏
[强网杯2022]WP-UM
5. Deploy the web project to the cloud server
Egg framework usage (1)
茄子科技CEO仇俊:以用户为中心,做用户真正需要的产品
19. Server-side session technology Session
Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
Open Source Summer | How OpenHarmony Query Device Type (eTS)
Voice-based social software development - making the most of its value
无题五
项目成本控制如何帮助项目成功?
2022华数杯数学建模A题环形振荡器的优化设计思路思路代码分享
C语言的高级用法
蚁剑webshell动态加密连接分析与实践
Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!
Microservice Technology Stack
static linking and dynamic linking