Add configuration for clusters endpoint. Closes #2929. (#2966)

This commit is contained in:
Ryan Baxter
2018-05-24 10:01:11 -04:00
committed by GitHub
parent 6734e1cad9
commit 5007d0e8f2
4 changed files with 84 additions and 2 deletions

View File

@@ -680,6 +680,29 @@ Spring Cloud provides a `spring-cloud-starter-netflix-turbine` that has all the
NOTE: By default, Spring Cloud lets Turbine use the host and port to allow multiple processes per host, per cluster.
If you want the native Netflix behavior built into Turbine to _not_ allow multiple processes per host, per cluster (the key to the instance ID is the hostname), set `turbine.combineHostPort=false`.
==== Clusters Endpoint
In some situations it might be useful for other applications to know what custers have been configured
in Turbine. To support this you can use the `/clusters` endpoint which will return a JSON array of
all the configured clusters.
.GET /clusters
[source,json]
----
[
{
"name": "RACES",
"link": "http://localhost:8383/turbine.stream?cluster=RACES"
},
{
"name": "WEB",
"link": "http://localhost:8383/turbine.stream?cluster=WEB"
}
]
----
This endpoint can be disabled by setting `turbine.endpoints.clusters.enabled` to `false`.
=== Turbine Stream
In some environments (such as in a PaaS setting), the classic Turbine model of pulling metrics from all the distributed Hystrix commands does not work.