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

Add readiness check for rabbitmq #643

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

penguincoder
Copy link
Contributor

This adds a readiness check very similar to what is done in the Docker world to check for rabbitmq readiness.

I have some async workers that can boot faster than rabbitmq, so it would be nice to have a healthcheck that gates my code until the process actually responds.

@domenkozar domenkozar merged commit f5daada into cachix:main Jun 6, 2023
95 checks passed
process-compose = {
readiness_probe = {
exec.command = "${cfg.package}/bin/rabbitmq-diagnostics -q ping";
initial_delay_seconds = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a tad bit too high for me.
It should be fine to have the check fail a few times in case the process starts up faster than 10 seconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was about 8 seconds on my M1 Pro, and with a 10 second period, it would end up being something like 20 seconds before it would be considered ready otherwise. I can definitely lower it, though, maybe even switch to a 5 second period instead. It's not a very taxing command.

@penguincoder penguincoder deleted the rabbitmq-readiness-check branch June 7, 2023 14:02
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

Successfully merging this pull request may close these issues.

None yet

3 participants