-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add health check API endpoints #595
Add health check API endpoints #595
Conversation
ede6246
to
819c956
Compare
Might need to bind |
Have not really looked at the PR but I think we should agree on same names for those probes in Trino Gateway and Trino . What do you think are suitable URLs .. I think it could literally just be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK Trino doesn't yet have endpoints dedicated for probes. The z
suffix is a convention started at Google, widely adopted in Kubernetes apps. I'm ok with that, OTOH there's little chance we'll have conflicts with other endpoints.
gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayHealthCheckResource.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayHealthCheckResource.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/test/java/io/trino/gateway/ha/TestGatewayHaMultipleBackend.java
Outdated
Show resolved
Hide resolved
Fair enough .. i saw the healthz in others but the two you created @oneonestar are better .. so lets run with that then. |
819c956
to
d20f52e
Compare
72becaa
to
034b5f6
Compare
gateway-ha/src/test/java/io/trino/gateway/ha/TestGatewayHaMultipleBackend.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayHealthCheckResource.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayHealthCheckResource.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayHealthCheckResource.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mini nits for the docs, then good to go. Feel free to merge after fixing docs and testing locally
Co-authored-by: Manfred Moser <[email protected]>
Co-authored-by: Manfred Moser <[email protected]>
Co-authored-by: Manfred Moser <[email protected]>
Co-authored-by: Manfred Moser <[email protected]>
Great.,., just make sure you squash commits... |
Description
Add two new health check API endpoints:
/trino-gateway/livez
and/trino-gateway/readyz
.Additional context and related issues
/trino-gateway/livez
always returns 200./trino-gateway/readyz
returns 200 after the initial fetch from database and the first round of Trino cluster health check is completed. Otherwise, 503 will be returned.Release notes
(x) Release notes are required, with the following suggested text: