istio-operation-bible icon indicating copy to clipboard operation
istio-operation-bible copied to clipboard

UPSTREAM_HOST和文章中描述的不一样

Open vperson opened this issue 3 years ago • 1 comments

大佬,不好意思打扰下,我在学习过程中遇到了一点问题。

文章地址:https://www.aeraki.net/istio-operation-bible/content/debug-istio/debug-with-envoy-log.html 有这么一段话:

UPSTREAM_HOST: 

上游主机的 host,表示从 envoy 发出的请求的目的端,通常是「ip:port」

通常来说,对于 outbound cluster,此值是「上游pod-ip : pod-port」 ,而对于 inbound cluster,此值是「127.0.0.1 : pod-port」

但是我做实验后看到upstream_local_address符合这个描述,而upstream_host不符合。

不知道是不是我实验做错了。

我的请求日志如下: review

{
  "downstream_remote_address": "172.28.34.38:59004",
  "upstream_cluster": "outbound|9080|v1|ratings.bookinfo.svc.cluster.local",
  "upstream_local_address": "172.28.34.38:58686",
  "downstream_local_address": "10.100.81.58:9080",
  "authority": "ratings:9080",
  "upstream_host": "172.28.34.57:9080",
}

rating

{
  "authority": "ratings:9080",
  "downstream_local_address": "172.28.34.57:9080",
  "downstream_remote_address": "172.28.34.38:58686",
  "upstream_local_address": "127.0.0.6:51510",
  "upstream_cluster": "inbound|9080||",
  "upstream_host": "172.28.34.57:9080",
  "requested_server_name": "outbound_.9080_.v1_.ratings.bookinfo.svc.cluster.local",
}

vperson avatar Oct 21 '21 09:10 vperson

@vperson 这篇文章写的比较早,在 < 1.10 istio 中,upstream_host 的确会是 127.0.0.1, 但在 istio 1.10 中 upstream_host 调整成了 pod ip, 详见:https://istio.io/latest/blog/2021/upcoming-networking-changes/

我会在此文上做一下更新说明。 感谢反馈。

zhongfox avatar Nov 05 '21 07:11 zhongfox