Open a5r0n opened 2 years ago
@a5r0n Thank you for opening this issue!
I want to do a bit more research around how we should do health checking / export health status, etc. I'll get back to you soon 👍
@a5r0n Thank you for opening this issue!
I want to do a bit more research around how we should do health checking / export health status, etc. I'll get back to you soon +1
@hibiken how about just a basic redis ping/connection check like the server has right now, exposed through the callback function passed in the server config
// Config specifies the server's background-task processing behavior.
type Config struct {
...
// HealthCheckFunc is called periodically with any errors encountered during ping to the
// connected redis server.
HealthCheckFunc func(error)
// HealthCheckInterval specifies the interval between healthchecks.
//
// If unset or zero, the interval is set to 15 seconds.
HealthCheckInterval time.Duration
...
}
This seems to work very good for me on the server side. Would love to have the same on the client side ;)
This seems to work very good for me on the server side. Would love to have the same on the client side ;)
How did you do that? Any sample codes please?
I'm creating an app in a cluster, and I need to expose some liveliness probes. Is there something ready-to-use from asynq? Otherwise, I'll just spin a small http server.
I personally would love to ping Redis (through the Asynq Client/Server) directly instead of relying on Asynq's callback function to do this for me. I have multiple dependencies performing health checks for my service and each one of them provide a direct function call that I can fanout. However for Asynq, I need to rely on the "latest" status returned, which may end up being stale at that point.
Hey @hibiken, I'm bumping this thread to see if you had a chance to consider my last message. I also tagged this issue in a PR I submitted a few weeks back.
Is your feature request related to a problem? Please describe. to manage app lifecycle, we need to know when to restart some services
Describe the solution you'd like exposing backend services health (like the Redis connection) should do the trick
@hibiken do u accept PR for this? Any thoughts how to implement? NB, i quite new in go, so i need some guidance