当前位置: 首页 > news >正文

商业空间平面图泉州seo按天付费

商业空间平面图,泉州seo按天付费,个人网站备案取消,南充网站建设略奥科技Hystrix-dashboard是一款针对Hystrix进行实时监控的工具#xff0c;通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。但是只使用Hystrix Dashboard的话, 你只能看到单个应用内的服务信息, 这明显不够. 我们需要一个工具能让我们…Hystrix-dashboard是一款针对Hystrix进行实时监控的工具通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。但是只使用Hystrix Dashboard的话, 你只能看到单个应用内的服务信息, 这明显不够. 我们需要一个工具能让我们汇总系统内多个服务的数据并显示到Hystrix Dashboard上, 这个工具就是Turbine. Hystrix Dashboard 我们在熔断示例项目spring-cloud-consumer-hystrix的基础上更改重新命名为spring-cloud-consumer-hystrix-dashboard。 1、添加依赖 dependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-hystrix/artifactId /dependency dependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-hystrix-dashboard/artifactId /dependency dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-actuator/artifactId /dependency 这三个包必须添加 2、启动类 启动类添加启用Hystrix Dashboard和熔断器 SpringBootApplication EnableDiscoveryClient EnableFeignClients EnableHystrixDashboard EnableCircuitBreaker public class ConsumerApplication {public static void main(String[] args) {SpringApplication.run(ConsumerApplication.class, args);} } 3、测试 启动工程后访问 http://localhost:9001/hystrix将会看到如下界面 图中会有一些提示 Cluster via Turbine (default cluster): http://turbine-hostname:port/turbine.stream Cluster via Turbine (custom cluster): http://turbine-hostname:port/turbine.stream?cluster[clusterName] Single Hystrix App: http://hystrix-app:port/hystrix.stream 大概意思就是如果查看默认集群使用第一个url,查看指定集群使用第二个url,单个应用的监控使用最后一个我们暂时只演示单个应用的所以在输入框中输入 http://localhost:9001/hystrix.stream 输入之后点击 monitor进入页面。 如果没有请求会先显示Loading ...访问http://localhost:9001/hystrix.stream 也会不断的显示ping。 请求服务http://localhost:9001/hello/neo就可以看到监控的效果了首先访问http://localhost:9001/hystrix.stream显示如下 ping: data: {type:HystrixCommand,name:HelloRemote#hello(String),group:spring-cloud-producer,currentTime:1494915453986,isCircuitBreakerOpen:false,errorPercentage:100,errorCount:1,requestCount:1,rollingCountBadRequests:0,rollingCountCollapsedRequests:0,rollingCountEmit:0,rollingCountExceptionsThrown:0,rollingCountFailure:0,rollingCountFallbackEmit:0,rollingCountFallbackFailure:0,rollingCountFallbackMissing:0,rollingCountFallbackRejection:0,rollingCountFallbackSuccess:1,rollingCountResponsesFromCache:0,rollingCountSemaphoreRejected:0,rollingCountShortCircuited:0,rollingCountSuccess:0,rollingCountThreadPoolRejected:0,rollingCountTimeout:1,currentConcurrentExecutionCount:0,rollingMaxConcurrentExecutionCount:0,latencyExecute_mean:0,latencyExecute:{0:0,25:0,50:0,75:0,90:0,95:0,99:0,99.5:0,100:0},latencyTotal_mean:0,latencyTotal:{0:0,25:0,50:0,75:0,90:0,95:0,99:0,99.5:0,100:0},propertyValue_circuitBreakerRequestVolumeThreshold:20,propertyValue_circuitBreakerSleepWindowInMilliseconds:5000,propertyValue_circuitBreakerErrorThresholdPercentage:50,propertyValue_circuitBreakerForceOpen:false,propertyValue_circuitBreakerForceClosed:false,propertyValue_circuitBreakerEnabled:true,propertyValue_executionIsolationStrategy:THREAD,propertyValue_executionIsolationThreadTimeoutInMilliseconds:1000,propertyValue_executionTimeoutInMilliseconds:1000,propertyValue_executionIsolationThreadInterruptOnTimeout:true,propertyValue_executionIsolationThreadPoolKeyOverride:null,propertyValue_executionIsolationSemaphoreMaxConcurrentRequests:10,propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests:10,propertyValue_metricsRollingStatisticalWindowInMilliseconds:10000,propertyValue_requestCacheEnabled:true,propertyValue_requestLogEnabled:true,reportingHosts:1,threadPool:spring-cloud-producer}data: {type:HystrixThreadPool,name:spring-cloud-producer,currentTime:1494915453986,currentActiveCount:0,currentCompletedTaskCount:1,currentCorePoolSize:10,currentLargestPoolSize:1,currentMaximumPoolSize:10,currentPoolSize:1,currentQueueSize:0,currentTaskCount:1,rollingCountThreadsExecuted:0,rollingMaxActiveThreads:0,rollingCountCommandRejections:0,propertyValue_queueSizeRejectionThreshold:5,propertyValue_metricsRollingStatisticalWindowInMilliseconds:10000,reportingHosts:1} 说明已经返回了监控的各项结果 到监控页面就会显示如下图 其实就是http://localhost:9001/hystrix.stream返回结果的图形化显示Hystrix Dashboard Wiki上详细说明了图上每个指标的含义如下图 到此单个应用的熔断监控已经完成。 Turbine 在复杂的分布式系统中相同服务的节点经常需要部署上百甚至上千个很多时候运维人员希望能够把相同服务的节点状态以一个整体集群的形式展现出来这样可以更好的把握整个系统的状态。 为此Netflix提供了一个开源项目Turbine来提供把多个hystrix.stream的内容聚合为一个数据源供Dashboard展示。 1、添加依赖 dependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-turbine/artifactId/dependencydependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-netflix-turbine/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-actuator/artifactId/dependencydependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-hystrix-dashboard/artifactId/dependency /dependencies 2、配置文件 spring.application.namehystrix-dashboard-turbine server.port8001 turbine.appConfignode01,node02 turbine.aggregator.clusterConfig default turbine.clusterNameExpression new String(default)eureka.client.serviceUrl.defaultZonehttp://localhost:8000/eureka/ turbine.appConfig 配置Eureka中的serviceId列表表明监控哪些服务turbine.aggregator.clusterConfig 指定聚合哪些集群多个使用,分割默认为default。可使用http://.../turbine.stream?cluster{clusterConfig之一}访问turbine.clusterNameExpression 1. clusterNameExpression指定集群名称默认表达式appName此时turbine.aggregator.clusterConfig需要配置想要监控的应用名称2. 当clusterNameExpression: default时turbine.aggregator.clusterConfig可以不写因为默认就是default3. 当clusterNameExpression: metadata[cluster]时假设想要监控的应用配置了eureka.instance.metadata-map.cluster: ABC则需要配置同时turbine.aggregator.clusterConfig: ABC3、启动类 启动类添加EnableTurbine激活对Turbine的支持 SpringBootApplication EnableHystrixDashboard EnableTurbine public class DashboardApplication {public static void main(String[] args) {SpringApplication.run(DashboardApplication.class, args);}} 到此Turbinehystrix-dashboard-turbine配置完成 4、测试 在示例项目spring-cloud-consumer-hystrix基础上修改为两个服务的调用者spring-cloud-consumer-node1和spring-cloud-consumer-node2 spring-cloud-consumer-node1项目改动如下 application.properties文件内容 spring.application.namenode01 server.port9001 feign.hystrix.enabledtrueeureka.client.serviceUrl.defaultZonehttp://localhost:8000/eureka/ spring-cloud-consumer-node2项目改动如下 application.properties文件内容 spring.application.namenode02 server.port9002 feign.hystrix.enabledtrueeureka.client.serviceUrl.defaultZonehttp://localhost:8000/eureka/HelloRemote类修改 FeignClient(name spring-cloud-producer2, fallback HelloRemoteHystrix.class) public interface HelloRemote {RequestMapping(value /hello)public String hello2(RequestParam(value name) String name);} 对应的HelloRemoteHystrix和ConsumerController类跟随修改具体查看代码 修改完毕后依次启动spring-cloud-eureka、spring-cloud-consumer-node1、spring-cloud-consumer-node1、hystrix-dashboard-turbineTurbine 打开eureka后台可以看到注册了三个服务 访问 http://localhost:8001/turbine.stream 返回 : ping data: {reportingHostsLast10Seconds:1,name:meta,type:meta,timestamp:1494921985839} 并且会不断刷新以获取实时的监控数据说明和单个的监控类似返回监控项目的信息。进行图形化监控查看输入http://localhost:8001/hystrix返回酷酷的小熊界面输入 http://localhost:8001/turbine.stream然后点击 Monitor Stream ,可以看到出现了俩个监控列表 示例代码 参考 使用Spring Cloud与Docker实战微服务 作者纯洁的微笑出处http://www.ityouknow.com/版权归作者所有转载请注明出处 转载于:https://www.cnblogs.com/ityouknow/p/6889059.html
http://www.zqtcl.cn/news/425870/

相关文章:

  • jsp电商网站开发教程盐城网站建设制作
  • 企业解决方案网站做企业官网多少钱
  • 宁波网站建设哪家比较好怎麽做网站
  • 诸塈市建设局网站做移动网站开发
  • 南京建站公司网站网站视频源码地址
  • 德阳建设局网站做公众号首图的网站
  • 南阳网站优化渠道山西太原最新消息
  • 发布做网站需求qq群centos wordpress 建站教程
  • 东阳网站建设yw126南京网站改版
  • discuz视频网站模板徐州专业网站建设公司哪家好
  • 网站开发投资成本Wordpress显示成缩略图
  • 网站域名和网站网址吗中东跨境电商平台有哪些
  • 常宁市城乡和住房建设网站怎样加强文化建设
  • 视频网站如何做营销策划模板网站 seo
  • 中企动力做网站好吗网页建设软件
  • 爱站网seo浙江省嘉兴市建设局网站
  • 南宁做网站比较好的公司有哪些贵阳网站上门备案业务
  • 网络叶子 网站推广做一手房做那个网站好
  • 太仓网站建设平台成都家装设计公司排名
  • 现在建一个网站一年费用只要几百元如何建一个免费试用网站
  • 网站没有被收录销售型网站的建设流程及特点
  • 成都58手机微信网站建设名录近一周财经新闻热点
  • wordpress情侣网站源码微信开放平台官网登录
  • 网站改版提示无需改版有没有兼职做设计的网站
  • 网站sem怎么做网络建设设计方案
  • wap网站在线生成做饰品网站
  • 网站主机在哪里注册呢江西的赣州网站建设
  • 零基础网站建设视频教程建筑设计专业是干什么的
  • 淘客做网站的话虚拟主机多大重庆网上房地产网签合同查询
  • 官网建站网站seo关键字优化软件