mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #155] [FEATURE REQUEST] Add ability to check heartbeat? #1061
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1061
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jimmy-ho on GitHub (May 28, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/155
Originally assigned to: @hibiken on GitHub.
I would like to call into either the *asynq.Client or *asynq.Server for whether they are healthy - ie. can connect to redis etc.
It seems at the moment this is not possible, I want this so my health-check route can come back with a valid response if they are not well.
Hopefully not something hard to add, or if you can enlighten me how to get this status (if available). Thanks!
Maybe a quick:
@hibiken commented on GitHub (May 28, 2020):
@jimmy-ho Thanks for opening this issue!
This is a good feature request. It's something we can (and probably should) add to
asynq.Server.For context:
Current implementation has a "heartbeater" goroutine that periodically writes server state to redis (so that we can inspect it with
asynq serversandasynq workersCLI commands).And I think we can leverage that goroutine to check whether the server can talk to redis and expose an API to surface that health check result.
Let me look into this a bit more and try to come up with a proposal. In the meantime, if you or anyone have suggestions on how the API should look, feel free to suggest in this thread. Thanks!
@hibiken commented on GitHub (Jul 24, 2020):
Initial Proposal
Add
HealthCheckFuncinConfig:By integrating with monitoring and alert system (e.g. Prometheus), users can monitor asynq.Server's health and alert if the server is having issues.
@a5r0n commented on GitHub (Apr 27, 2022):
i think we should expose the healthcheck in the
asynq.Clientas well,e.g. i have REST API to manage tasks and Add them to queue using the client, and i have to add healthcheck to API to let k8s to manage this pod,
@hibiken should i open new issue?
@hibiken commented on GitHub (Apr 29, 2022):
@a5r0n thanks for the comment, I think that makes sense.
Clientcan expose the health of the backend resource (Redis in our case). I've been meaning to revisit how we do health checks of Redis (Redis is a critical backend for bothClientandServerinstances and we should expose a API to check the health). Please feel free to open a new issue 👍@bojanz commented on GitHub (Nov 12, 2023):
@hibiken Is https://github.com/hibiken/asynq/pull/585 enough, or should I go ahead and create a separate issue as well?