-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Ability to run health checks in parallel #1965
Comments
Totally! I need to double check the history because I am certain it used to be parallel at some point. Maybe related to a bug - I’ll need to check. I may be wrong but Either way I believe we can do this behavioural change directly on the I’ll check back on this in approx. 2 days because I am still on vacation 🏖 |
Thank you for the swift response! Yep i figured you would need No problem take your time, enjoy your vacation 😄 |
Released with 9.1.0 🎉 |
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
Hello, I have an app with an increasing number of indicators (currently ~10), and the
/health
endpoint is starting to feel rather slow. I've noticed that the indicators seem to be running in series.Describe the solution you'd like
I'm suggesting to run them in parallel, or at least add an option to run them in parallel.
This could be achieved with
Promise.all
orPromise.allSettled
(Node.js 12.9.0)Teachability, documentation, adoption, migration strategy
The api would be the same as now, with
this.healthCheckService.check(HealthIndicatorFunction[])
, only it would be running each element in the array concurrently. If you are afraid of some possible breaking change, or if you want to keep the possibility to run them in series for whatever reason, maybe we could add a new method.checkParallel(HealthIndicatorFunction[])
What is the motivation / use case for changing the behavior?
Increase performances of apps that have a lot of health indicators (I personally have my database, a cache db, an instant-search db, 4 storage buckets, memory, ping checks to different frontend apps etc...)
Thank you !
The text was updated successfully, but these errors were encountered: