mezos status endpoint with HTTP status return
context
In order to set up a load-balancer in front of mezos
, and/or to be able to check mezos
umami-stack endpoint status directly from umami client, there is currently no
request
Add an RPC endpoint to mezos that answers an HTTP return code according to the node vs. indexer drift.
http status code | semantic |
---|---|
2??, 3?? | node and indexer are at the same level (if possible : also IFF node is up to date with the p2p published blocks == node is fully synchronized) |
5?? / other error |
mezos should not be used by Umami client |
Goal
Only route queries to mezos
that are correctly setup, whether it be by a load balancer or directly by umami client.
Load balancers usually base their checks on the HTTP status code, cf. for example hetzner load balancer :
Questions
Is there a caching mechanism within mezos ?
return code and output
Hello @picdc, can you provide the different outputs for the different use-cases you mention already exist ?
/status output |
indexer OK | indexer KO |
---|---|---|
node OK | {} |
TBD |
node KO | TBD | TBD |
/status HTTP code |
indexer OK | indexer KO |
---|---|---|
node OK | 200 |
500 |
node KO | 500 |
500 |
Edited by Corentin Méhat