- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在让 Turbine 在 Spring Cloud 中工作时遇到了一些麻烦。简而言之,我无法确定如何将其配置为一次聚合来自多个应用程序的电路。
我有 6 个独立的服务、一个 Eureka 服务器和一个以独立模式运行的涡轮机服务器。我可以从我的 Eureka 服务器上看到所有服务都已注册,包括涡轮机。我的涡轮机服务器已启动并正在运行,并且我可以毫无问题地查看其/hystrix 页面。但是当我尝试使用它来检查turbo.stream时,我只看到turbine.appConfig中列出的第一个服务器,其余的都被忽略。
这是我的 Turbine 服务器的 application.yml,或者至少是相关部分:
---
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8010/eureka/
server:
port: 8030
info:
component: Turbine
turbine:
clusterNameExpression: new String(“default”)
appConfig: sentence,subject,verb,article,adjective,noun
management:
port: 8990
当我运行此程序并访问涡轮机实例上的 hystrix 仪表板并请求涡轮机.stream 时,输出中列出的唯一断路器适用于 appConfig 中列出的第一个服务,在本例中为“句子”服务。奇怪的是,如果我重新排列这些服务的顺序并将另一个服务放在第一位(如“名词”),我只会看到该服务的电路。仅显示列表中的第一个服务。
我承认对一些术语有点困惑,比如流、集群等,所以我可能会在这里遗漏一些基本概念,但我的理解是 Turbine 可以消化来自多个服务的流并将它们聚合在一个显示中。如有建议,我们将不胜感激。
最佳答案
我没有足够的声誉来发表评论,所以我必须在答案中写下这个:)
我遇到了完全相同的问题:
有两个服务“test-service”和“other-service”,每个服务都有自己的工作 hystrix-stream并且有一个 Turbine-Application,其配置如下:
turbine:
clusterNameExpression: new String("default")
appConfig: test-service,other-service
我的所有服务都在我的本地计算机上运行。
结果是:我的 Hystrix-Dashboard 仅显示“test-service”的指标。
原因:
看起来,以所描述的方式配置的 Turbine 客户端在同一主机上运行时无法处理多个服务。
这里解释一下:
https://github.com/Netflix/Hystrix/issues/117#issuecomment-14262713
Turbine maintains state of all these instances in order to maintain persistent connections to them and it does rely on the "hostname" and if the host name is the same then it won't instantiate a new connection to that same server (on a different port).
所以要点是,您的所有服务都必须使用不同的主机名注册。下面描述了如何在本地计算机上执行此操作。
更改您的主机文件:
# ...
127.0.0.1 localhost
127.0.0.1 localdomain1
127.0.0.1 localdomain2
# ...
127.0.0.1 localdomainx
然后将每个客户端的主机名设置为不同的域条目,如下所示:
application.yml:
eureka:
instance:
hostname: localdomainx
关于spring-boot - Spring Cloud Turbine - 无法处理多个客户端?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29934171/
我正在尝试运行 Spring Boot(使用 Spring Cloud)+ Eureka Server + Hystrix Dashboard 和 Turbine 流,但我遇到了一个问题,到目前为止我
我正在尝试在 netbeans 中获取 Turbine CSS 语法高亮显示(针对 cssp 文件),但我一直无法找到任何高亮显示或方法。 你知道怎么做吗? 最佳答案 也许您可以为 Netbeans
一. 简介 上一篇文章我们已经实现了对单个服务实例的监控,当然在实际应用中,单个实例的监控数据没有多大的价值,我们更需要的是一个集群系统的监控信息,这时我们就需要引入turbine。turbine
本文整理了Java中com.yammer.breakerbox.turbine.YamlInstanceDiscovery类的一些代码示例,展示了YamlInstanceDiscovery类的具体用法
我有一个 Turbine 和 Hystrix 设置在工作,但决定将其更改为 Turbine AMQP,这样我就可以将多个服务聚合到一个流/仪表板中。 我已经设置了一个在 localhost:8989
我在让 Turbine 在 Spring Cloud 中工作时遇到了一些麻烦。简而言之,我无法确定如何将其配置为一次聚合来自多个应用程序的电路。 我有 6 个独立的服务、一个 Eureka 服务器和一
我正在使用 spring boot 1.3.1 和 spring cloudl Brixtom.M4,在使用 springboot 1.3.1 时我发现 Turbine-AMQP 项目不再可用,我们现
我用 Spring boot 2 和最新版本的 Spring Cloud 尝试了 turbine + hystrix 仪表板,似乎存在一些问题并且 turbine 无法从响应式(Reactive)服务
我是一名优秀的程序员,十分优秀!