Spring Cloud Turbine - Unable to handle multiple clients? -
i’m having bit of trouble getting turbine work in spring cloud. in nutshell, can’t determine how configure aggregate circuits more 1 application @ time.
i have 6 separate services, eureka server, , turbine server running in standalone mode. can see eureka server of services registered, including turbine. turbine server , running, , can see /hystrix page without issue. when try use examine turbine.stream, see first server listed in turbine.appconfig, rest ignored.
this turbine server’s application.yml, or @ least relevant parts:
--- 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 when run , access hystrix dashboard on turbine instance, asking turbine.stream, circuit breakers listed in output first service listed in appconfig, “sentence” service in case. curiously, if re-arrange order of these services , put 1 first (like “noun”), see circuits service. first service in list displayed.
i’ll admit being little confused on of terminology, streams, clusters, etc., missing basic concept here, understanding turbine digest streams more 1 service , aggregate them in single display. suggestions appreciated.
i don't have enough reputation comment, have write in answer :)
i had same problem:
there 2 services "test-service" , "other-service", each it's own working hystrix-stream , there 1 turbine-application, configured this:
turbine: clusternameexpression: new string("default") appconfig: test-service,other-service all of services running on local machine.
result is: hystrix-dashboard shows metrics "test-service".
reason:
it seems be, turbine-client configured described way doesn't handle multiple services when running @ same host.
this explained here:
https://github.com/netflix/hystrix/issues/117#issuecomment-14262713
turbine maintains state of these instances in order maintain persistent connections them , rely on "hostname" , if host name same won't instantiate new connection same server (on different port).
so main point is, of services must registered different hostnames. how on local machine described below.
update 2015-06-12/2016-01-23: workaround local testing
change hostfile:
# ... 127.0.0.1 localhost 127.0.0.1 localdomain1 127.0.0.1 localdomain2 # ... 127.0.0.1 localdomainx and set hostname clients each different domain-entry this:
application.yml:
eureka: instance: hostname: localdomainx
Comments
Post a Comment