Closed marcingrzejszczak closed 9 years ago
Ideas:
/collaborators
for each microservice to analyze availability and connectivity. We will get rich information like: which services are up and which connections are working. Bonus point: checking health
endpointCurrently open PR https://github.com/4finance/micro-infra-spring/pull/143 introduces several improvements:
/collaborators
includes all instances (URLs) of my collaborators, not just random one chosen by Curator:
curl -qs localhost:8095/collaborators | python -mjson.tool
{
"com/ofg/twitter-places-collerator": {
"http://127.0.1.1:8096": "DOWN",
"http://127.0.1.1:8097": "UP"
}
}
/collaborators/all
endpoint aggregates /collaborator
responses from all instances of all microservices:
curl -qs localhost:8095/collaborators/all | python -mjson.tool
{
"com/ofg/twitter-places-analyzer": {
"http://127.0.1.1:8095": {
"collaborators": {
"com/ofg/twitter-places-collerator": {
"http://127.0.1.1:8096": "DOWN",
"http://127.0.1.1:8097": "UP"
}
},
"status": "UP"
}
},
"com/ofg/twitter-places-collerator": {
"http://127.0.1.1:8096": {
"collaborators": {},
"status": "DOWN"
},
"http://127.0.1.1:8097": {
"collaborators": {},
"status": "UP"
}
},
"com/ofg/social-engine": {
"http://127.0.1.1:8098": {
"collaborators": {
"com/ofg/twitter-places-analyzer": {
"http://127.0.1.1:8095": "UP"
}
},
"status": "UP"
}
}
}
/collaborators/view.html
is a simple JavaScript view of data returned from collaborators/all
:
Red arrow means that connectivity between given two services is broken. Red circle represents unresponsive service. Notice that it's possible to have working (green) microservice but some connections to it broken. The opposite would be quite unusual.
ServiceResolve
) was refined to always use service path (e.g. com/ofg/twitter-places-collerator
) rather than aliases (collerator
), which are local to each microservice and should never escape./collaborators
aren't backward compatible, /collaborators/all
has a fallback mode to work with older clients. If clients are so old that they don't support /colleborators
(pre-0.5.3), meta-fallback is used that calls barely /ping
.I will place description above in Wiki once merged.
/collaborators
invocations of each instance (now calling /collabortors/all
can take significant time as it traverses instances one by one). Also hystrix will automatically apply timeout. Make sure each microservice uses separate thread pool+1
Definitely +1 :)
I'm looking for a review, not applause :-).
Don't flatter yourself :P I think that those +1 are written after a review and not before it ;)
We would have to go around each of the microservices inside zookeeper and check their collaborators. Then repeat that recursively until we draw the full diagram of the dependencies.