-
Notifications
You must be signed in to change notification settings - Fork 63
feat(cardano-services): improve health check response times by aggregating and caching #1459
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
Conversation
|
e03e6d0 to
a64610f
Compare
packages/cardano-services/src/util/TypeormProvider/TypeormProvider.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @ginnun !
…ating and caching
c076aaa to
2bc68ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @ginnun. Happy to see this progress
This PR aims to improve health check API response times (to under 1 sec) by pre-fetching and caching the underlying service health.
Context
Generating on-demand health check responses is taking a long time.
Proposed Solution
We want to aggregate and cache underlying health check responses in the background. On-demand health check API responses will be generated from the always-warm cache.
We implemented a WarmCache logic by extending InMemoryCache.
One cache can be shared with multiple providers.
Important Changes Introduced
Now, various providers will be aggregating health checks independently in the background.