Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/health API endpoint needed #194

Closed
aphelionz opened this issue Mar 10, 2022 · 9 comments · Fixed by #513
Closed

/health API endpoint needed #194

aphelionz opened this issue Mar 10, 2022 · 9 comments · Fixed by #513

Comments

@aphelionz
Copy link
Contributor

When running this in a cloud or containerized context, it's necessary to have an endpoint that returns 200 if the pathfinder node is healthy. We can define healthy however we like but I'd say anything in syncing / synced mode would count.

@aphelionz
Copy link
Contributor Author

Alternatively, you could have the root path / just return a 200 with an empty body

@tarrencev
Copy link
Contributor

+1 would love to support this for my k8s deployment

@CHr15F0x
Copy link
Member

CHr15F0x commented May 6, 2022

Related: #261 .

@fracek
Copy link
Contributor

fracek commented May 10, 2022

I think the service should have a liveness endpoint (/livez) and a readyness one (/readyz). I like how the k8s api not only returns a success response but also some extra information to debug what went wrong.

@tarrencev
Copy link
Contributor

Unfortunately it seems even with the newer jsonrpsee it is not possible to register handlers outside of their abstraction. Would pathfinder be open to adding an additional listener to expose this? Or should we try work with jsonrpsee to expose the necessary functionality?

@tarrencev
Copy link
Contributor

Registering a health handler is now supported upstream: paritytech/jsonrpsee#763

@fracek
Copy link
Contributor

fracek commented May 28, 2022

I will start working on this in the upcoming weeks. The health probes and metrics endpoints should be on a separate port anyway so I don't think we need to change the rpc code too much. The plan is to start a warp server that serves the right routes.

@Mirko-von-Leipzig
Copy link
Contributor

Added in #513.

@aphelionz
Copy link
Contributor Author

Thanks @Mirko-von-Leipzig !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants