Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upService Discovery for ZK-based Spring Cloud Services #4193
Comments
This comment has been minimized.
This comment has been minimized.
|
Thank you for your interest, I'm afraid that we're not accepting any new service discovery mechanisms currently. I suggest integrating via file_sd. |
This comment has been minimized.
This comment has been minimized.
|
Hi @brian-brazil, So new sd mechanisms will not be accepted even as pull requests? |
This comment has been minimized.
This comment has been minimized.
|
No, they won't be accepted currently. The maintenance burden of SD mechanisms is too high to take on any more I'm afraid. |
This comment has been minimized.
This comment has been minimized.
|
Ok, thanks, then I'm closing this issue. |
szhem
closed this
May 24, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 22, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
szhem commentedMay 24, 2018
Proposal
Use case. Why is this important?
Currently Prometheus has only two options to discover services from Zookeeper
We propose to implement one more popular option to discover services
which will allow to discover services registered by means of Apache Curator Service Discovery extension (which is based on Zookeeper).
Zookeeper+Curator is also a popular way to register Spring Cloud Services which use Zookeeper as a Service Registry.
The way of organizing services in Zookeeper is described here and looks like the following
The serialized ServiceInstance for Spring Cloud-based services is a json which looks like the following
{ "uriSpec": { "parts": [ { "variable": true, "value": "scheme" }, { "variable": false, "value": "://" }, { "variable": true, "value": "address" }, { "variable": false, "value": ":" }, { "variable": true, "value": "port" } ] }, "name": "my-service-v1", "id": "ea68ba6a-5174-4669-bbe1-7b2b1a9cb425", "address": "server-n1", "port": 6161, "sslPort": null, "payload": { "metadata": { "instance_status": "UP" }, "name": "my-service-v1", "id": "my-service-v1:6161", "@class": "org.springframework.cloud.zookeeper.discovery.ZookeeperInstance" }, "registrationTimeUTC": 1519676776918, "serviceType": "DYNAMIC" }The address of the service is built from
uriSpec.partsand then will be the followingThe metrics endpoint can be discovered from the metadata (which is customizable)
and then they can be obtained using the following address of the service