《Apache Dubbo微服务开发从入门到精通》——服务治理与生态——四、服务网格(2) https://developer.aliyun.com/article/1223950
d) 检查Provider和Consumer正常通信
继执行3.3步骤后,检查启动日志,查看consumer完成对provider服务的消费。
可以看到consumer pod日志输出如下(Triple协议被Envoy代理负载均衡):
consumer istio-proxy日志输出如下:
可以看到provider pod日志输出如下:
provider istio-proxy日志输出如下:
e) 流量治理-VirtualService实现按比例流量转发
部署v2版本的demo provider
设置VirtualService与DestinationRule,观察流量按照4:1的比例分别被引导到provider v1与provider v2版本。
从消费端日志输出中,观察流量分布效果如下图:
==================== dubbo invoke 100 end ====================
[10/08/22 07:15:58:058 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18.96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 101 end ====================
[10/08/22 07:16:03:003 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18.96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 102 end ====================
[10/08/22 07:16:08:008 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18.96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 103 end ====================
[10/08/22 07:16:13:013 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v2: 172.18.96.6:50052, client: 172.18.96.6, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 104 end ====================
[10/08/22 07:16:18:018 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18.96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 105 end ====================
[10/08/22 07:16:24:024 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18.96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 106 end ====================
[10/08/22 07:16:29:029 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18.96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 107 end ====================
[10/08/22 07:16:34:034 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18.96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 108 end ====================
[10/08/22 07:16:39:039 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.22:50052, client: 172.18.96.22, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
==================== dubbo invoke 109 end ====================
[10/08/22 07:16:44:044 UTC] main INFO action.GreetingServiceConsumer: consumer Unary reply <-message: "hello,service mesh, response from provider-v1: 172.18.96.18:50052, client: 172.18.96.18, local: dubbo-samples-mesh-provider, remote: null, isProviderSide: true"
f) 查看dashboard
Istio官网查看如何启动dashboard。
《Apache Dubbo微服务开发从入门到精通》——服务治理与生态——四、服务网格(4) https://developer.aliyun.com/article/1223945