-
Notifications
You must be signed in to change notification settings - Fork 7
Improve health check for wallet backend services #251
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
base: main
Are you sure you want to change the base?
Conversation
…integration tests
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.
LGTM! Plz, feel free to merge it after addressing the comments below.
rpcHealth, err := h.RPCService.GetHealth() | ||
if err != nil { | ||
httperror.InternalServerError(ctx, "", err, nil, h.AppTracker).Render(w) | ||
return | ||
} |
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.
Reaching RPC every time might not be the best approach here.
Can we use something like a 1-minute cache here?
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.
Hmm, I dont think it should be an issue here since its a health check and it doesnt impact any other wallet-backend operation. Are you thinking it would slow down requests from RPC side? I assume it can handle multiple health requests and also other endpoint requests? cc @Shaptic @2opremio any thoughts here?
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.
It’s definitely fine to have this be in parallel with other requests. In fact I’m fairly certain this is exactly what happens in our k8s deployment. I’d recommend wrapping the message in the returned error, though, for verbosity.
What
Why
We spin up the API and Ingest services separately in our kubernetes environment. The ingest service needs a health check endpoint so that the readiness probe for kube can be configured to check for ingest service health.
Known limitations
N/A
Checklist
PR Structure
all
if the changes are broad or impact many packages.Thoroughness
Release