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

Ideas how on to health check the ec2 that hosts resque workers #1797

Open
454400098 opened this issue Apr 3, 2022 · 2 comments
Open

Ideas how on to health check the ec2 that hosts resque workers #1797

454400098 opened this issue Apr 3, 2022 · 2 comments

Comments

@454400098
Copy link

Hi Team resque,

our team is heavily relying on resque workers that hosted on the utility ec2(vs the web ec2 that accepts the web traffic). In the web ec2, we have load balancer setup to make http get request to a Ruby on Rails controller (in our web ec2) constantly.

However, for the utility server, we don't receive the external web request by its nature, so it seems no point to set up a Ruby on Rails controller endpoint to have load balencer make http request to do the health check right?

I wonder if there is something that I miss like our resque natively support or other folks have insight like how we can make sure once the VM(EC2) is provisioned along with resque process, how can we do health check

is there something like a internal api we can use that acts like a health status?

again, appreciate team resque's work!

Thank you

@nathanhamilton
Copy link

@454400098 Thanks for posting this.

@iloveitaly Our team is in the same situation as @454400098 using the ec2 to host and run the resque server. It would be nice to have some type of web request setup to be able to receive a health check like that.

Alternatively, others having this issue in a queuing service have their service output to a log file or STDOUT and a service (like NewRelic for example) can read either STDOUT or they have an internal service in AWS read the log file. Would it be possible to have a specific log run every 5 minutes for uptime/health checks?

@ruckus
Copy link

ruckus commented Jan 5, 2024

I have solved this by implementing this command in my healthcheck

    count = Resque.redis.scard("workers")

If the count is zero (or less than some desired threshold) that is an error

This command gets run on my web app (Rails) which is not the same machine as the workers.

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

No branches or pull requests

3 participants