1、启动provider
zookeeper.ZookeeperRegistry: [DUBBO]Register:
dubbo://192.168.1.102:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=demo-provider&dubbo=2.0.0&generic=false&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=20736&side=provider×tamp=1517824406227, dubbo version: 2.0.0, current host: 192.168.1.102
zookeeper.ZookeeperRegistry:DUBBO]Subscribe: provider://192.168.1.102:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=demo-provider&category=configurators&check=false&dubbo=2.0.0&generic=false&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=20736&side=provider×tamp=1517824406227, dubbo version: 2.0.0, current host: 192.168.1.102
日志分析:
(1)启动时向zookeeper注册中心注册dubbo://192.168.1.102:20880/com.alibaba.dubbo.demo.DemoService(目前我代码只有这一个接口,所以只会注册这一个)
(2)启动时向zookeeper注册中心订阅configurators(动态配置,category=configurators)
2、启动consumer
zookeeper.ZookeeperRegistry: [DUBBO]Subscribe:
consumer://192.168.1.102/com.alibaba.dubbo.demo.DemoService?application=demo-consumer&category=providers,configurators,routers&check=false&dubbo=2.0.0&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=34248&qos.port=33333&side=consumer×tamp=1517824680225, dubbo version: 2.0.0, current host: 192.168.1.102
日志分析:
(1)启动时向zookeeper注册中心订阅providers(接口)、configurators(动态配置)、routers(负载均衡)
3、注册中心向provider和consumer推送
4、建立长连接
consumer启动日志:
transport.AbstractClient:
[DUBBO] Successed connect to server /192.168.1.102:20880 from
NettyClient 192.168.1.102 using dubbo version 2.0.0, channel is
NettyChannel [channel=[id: 0x83137132, /192.168.1.102:2631 =>
/192.168.1.102:20880]], dubbo version: 2.0.0, current host:
192.168.1.102
日志分析:
启动consumer时,从netty客户端(zookeeper)成功的连接到了provider(192.168.1.102:20880 )
5、定时发送统计数据给monitor
完整图解
网友评论