evnoy协议转换关键日志

http协议

client代理端

建立连接过程:

new connection from 172.17.0.1:58074

进来的简单的协议头

':authority', 'localhost:9001'
':path', '/service1/hello'
':method', 'GET'
'user-agent', 'curl/7.54.0'
'accept', '*/*'
'x-host-port', '192.168.65.2:9003'

定位到具体的cluster

cluster 'remote-proxy-with-bridge' match for URL '/service1/hello'

router decoding headers:

':authority', 'localhost:9001'
':path', '/service1/hello'
':method', 'GET'
':scheme', 'http'
'user-agent', 'curl/7.54.0'
'accept', '*/*'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', 'bd2f2ecb-eb7b-4127-a6f3-37e6d549e766'
'x-envoy-expected-rq-timeout-ms', '15000'

响应接收完结

upstream headers complete:

响应头解析

':status', '200'
'content-type', 'application/json; charset=UTF-8'
'date', 'Fri, 15 Sep 2023 03:08:36 GMT'
'content-length', '79'
'x-envoy-upstream-service-time', '19'
'server', 'envoy'

sever代理端

request headers complete
':authority', 'localhost:9001'
':path', '/service1/hello'
':method', 'GET'
'user-agent', 'curl/7.54.0'
'accept', '*/*'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', '819f5aa5-47f0-4c40-a15a-d42ebe00cfd3'
'x-envoy-expected-rq-timeout-ms', '15000'

router decoding headers

':authority', 'localhost:9001'
':path', '/service1/hello'
':method', 'GET'
':scheme', 'http'
'user-agent', 'curl/7.54.0'
'accept', '*/*'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-downstream-service-cluster', ''
'x-request-id', '819f5aa5-47f0-4c40-a15a-d42ebe00cfd3'
'x-envoy-expected-rq-timeout-ms', '15000'
'x-envoy-internal', 'true'

ws协议

client代理端

建立连接过程:

new connection from 172.17.0.1:58116

进来的简单的协议头

':authority', 'localhost:9001'
':path', '/service1/ws'
':method', 'GET'
'user-agent', 'Go-http-client/1.1'
'connection', 'Upgrade'
'sec-websocket-key', 'fsiMQm1+MlhrHYwTCU2KiQ=='
'sec-websocket-version', '13'
'upgrade', 'websocket'
'x-host-port', '192.168.65.2:9003'

定位到具体的cluster

cluster 'remote-proxy-with-bridge' match for URL '/service1/hello'

router decoding headers:

':authority', 'localhost:9001'
':path', '/service1/ws'
':method', 'GET'
':scheme', 'http'
'user-agent', 'Go-http-client/1.1'
'connection', 'Upgrade'
'sec-websocket-key', 'fsiMQm1+MlhrHYwTCU2KiQ=='
'sec-websocket-version', '13'
'upgrade', 'websocket'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', 'ce929aa5-51f4-49bd-962c-11ba7f14dfac'
'x-envoy-expected-rq-timeout-ms', '15000'

响应接收完结

upstream headers complete:

响应头解析

':status', '101'
'upgrade', 'websocket'
'connection', 'Upgrade'
'sec-websocket-accept', 'XkJsGcXLbGlJS2mfjezPFvlzXe8='
'date', 'Fri, 15 Sep 2023 03:34:17 GMT'
'server', 'envoy'

sever代理端

request headers complete
':authority', 'localhost:9001'
':path', '/service1/ws'
':method', 'GET'
'user-agent', 'Go-http-client/1.1'
'connection', 'Upgrade'
'sec-websocket-key', '8gFWTeasO9X7GEz+vE1g5A=='
'sec-websocket-version', '13'
'upgrade', 'websocket'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', 'b616b702-5694-404e-b5d5-ff29582358ad'
'x-envoy-expected-rq-timeout-ms', '15000'

router decoding headers

':status', '101'
'upgrade', 'websocket'
'connection', 'Upgrade'
'sec-websocket-accept', 'W1mTzJ1NmaG6OlUbesHe3mmIXOQ='
'date', 'Fri, 15 Sep 2023 03:40:48 GMT'
'server', 'envoy'

socket-http协议

sever代理端

request headers complete
':authority', '192.168.65.2:10001'
':method', 'CONNECT'

router decoding headers

':authority', '192.168.65.2:10001'
':method', 'CONNECT'
':scheme', 'https'
'x-forwarded-proto', 'https'
'x-request-id', 'a8b53a8d-69b8-47fc-a224-661e4fb7915e'
'x-envoy-expected-rq-timeout-ms', '15000'

响应值

':status', '200'
'date', 'Fri, 15 Sep 2023 04:36:39 GMT'
'server', 'envoy'

grpc-http协议

client代理端

建立连接过程:

new connection from 172.17.0.1:58116

进来的简单的协议头

':method', 'POST'
':scheme', 'http'
':path', '/kv.KV/Set'
':authority', 'localhost:9001'
'content-type', 'application/grpc'
'user-agent', 'grpc-go/1.47.0'
'te', 'trailers'
'x-host-port', '192.168.65.2:9003'

定位到具体的cluster

cluster 'remote-proxy-with-bridge' match for URL '/kv.KV/Set'

router decoding headers:

':method', 'POST'
':scheme', 'http'
':path', '/kv.KV/Set'
':authority', 'localhost:9001'
'content-type', 'application/grpc'
'user-agent', 'grpc-go/1.47.0'
'te', 'trailers'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', '76ad8264-c774-4237-98b7-7a8f7ff47fae'
'accept', 'application/grpc'
'x-envoy-expected-rq-timeout-ms', '15000'

响应接收完结

upstream headers complete:

响应头解析

':status', '200'
'content-type', 'application/grpc'
'x-envoy-upstream-service-time', '15'
'date', 'Fri, 15 Sep 2023 05:16:45 GMT'
'server', 'envoy'

sever代理端

request headers complete
':method', 'POST'
':scheme', 'http'
':path', '/kv.KV/Set'
':authority', 'localhost:9001'
'content-type', 'application/grpc'
'user-agent', 'grpc-go/1.47.0'
'te', 'trailers'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-internal', 'true'
'x-envoy-downstream-service-cluster', ''
'x-request-id', '76ad8264-c774-4237-98b7-7a8f7ff47fae'
'accept', 'application/grpc'
'x-envoy-expected-rq-timeout-ms', '15000'

router decoding headers

':method', 'POST'
':scheme', 'http'
':path', '/kv.KV/Set'
':authority', 'localhost:9001'
'content-type', 'application/grpc'
'user-agent', 'grpc-go/1.47.0'
'te', 'trailers'
'x-host-port', '192.168.65.2:9003'
'x-forwarded-for', '172.17.0.1'
'x-forwarded-proto', 'http'
'x-envoy-downstream-service-cluster', ''
'x-request-id', '76ad8264-c774-4237-98b7-7a8f7ff47fae'
'accept', 'application/grpc'
'x-envoy-expected-rq-timeout-ms', '15000'
'x-envoy-internal', 'true'

upstream headers complete: end_stream=false

':status', '200'
'content-type', 'application/grpc'
'x-envoy-upstream-service-time', '4'
'date', 'Fri, 15 Sep 2023 05:16:45 GMT'
'server', 'envoy'
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值