设为首页 加入收藏

TOP

服务治理: Spring Cloud Eureka(三)
2019-09-03 01:23:53 】 浏览:62
Tags:服务 治理 Spring Cloud Eureka
dBalancer:{NFLoadBalancer:name=server-provider,current list of Servers=[macliu:8082, macliu:8081],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone; Instance count:2; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;] },Server stats: [[Server:macliu:8082; Zone:defaultZone; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0] , [Server:macliu:8081; Zone:defaultZone; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0] ]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@3dc2c2eb

再尝试刷新几次url,因为我们实在后台启动的程序,在终端会看到如下的信息

 INFO 28929 --- [nio-8082-exec-3] c.s.provider.controller.HelloController  : instance.host = macliuinstance.service = server-providerinstance.port = 8082

因为开了两个终端,一个是8081端口,一个是8082端口,多刷新几次页面后,会发现终端在循环输出上面的信息,来判断使用ribbon 实现了负载均衡。

欢迎关注Java建设者:一起学习交流

首页 上一页 1 2 3 4 5 6 下一页 尾页 3/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇if语句的嵌套使用之获取三个数据.. 下一篇笔记-迎难而上之Java基础进阶7

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目