当前位置: 首页 > 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.pierceye.com/news/425870/

相关文章:

  • 淮安网站建设要多少钱营销推广网歹
  • 洛阳建设企业网站成品app直播源码推荐
  • 网站值不值得做seo什么事三合一网站
  • 微网站开发协议中国建设部网站监理延续
  • 安阳网站建设公司wordpress评论模块
  • 做服装微商城网站wordpress后台载入慢
  • 免费3d模型素材网站免费发布房源的平台
  • 校园网站建设网个人网站设计论文道客巴巴
  • 网站网站制作价格建站网站建立网站第一步是什么
  • 组织部信息化建设官方网站郑州平面设计公司
  • 可信网站标志网站分析数据
  • 个人求职网站设计惠州建网站
  • 南京网站制作学校南京有名的网站建设公司
  • wordpress 代码页面宁波专业优化网站制作公司
  • 中国建设行业网站第五届中国国际进口博览会召开时间
  • 做网站设计的有些什么职位wordpress h1 h2 h3
  • 广告公司寮步网站建设哪家好怎么样在百度上推广自己的产品
  • 做亚马逊和淘宝网站公司网站建设深圳
  • 济宁建设网站网站改版 合同
  • wordpress 网站费用北京网站建设 知乎
  • 网站设计师绩效网站页面那个图怎么做
  • 帮别人起名 做ppt的网站做一个网站需要服务器吗
  • 高端网站建设公司兴田德润可以不新产品推广策划方案
  • 建设银行如何网站设置密码嵊州市建设银行网站
  • 陕西 网站建设福州mip网站建设
  • 让人做网站 需要准备什么网站建设国内外现状
  • 滨海做网站公司网页设计模板 中文
  • 辽源市网站建设怎么学做电商
  • 做pc端网站行情网站标签化
  • 中国做的很好的食品网站php图片网站源码