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

feat(http): Added http healthcheck endpoint #1725

Merged
merged 30 commits into from
Jul 28, 2023
Merged

feat(http): Added http healthcheck endpoint #1725

merged 30 commits into from
Jul 28, 2023

Conversation

gurinderu
Copy link
Contributor

@gurinderu gurinderu commented Jul 26, 2023

Description

Added health check HTTP endpoint

Motivation

For now it is not possible to understand the status of node, it can be fully or partially broken. Health check allows to define critical checks to determine a system status.

Proposed Changes

  • Added a health check registry with stores all checkers.
  • The HTTP status based on the consul docs.

Screenshots (if applicable)

image

Additional Notes

Also was fixed metric for bootstrap disconnected. it was applied for all disconnected events, not only bootstrap addresses.

Checklist

  • The code follows the project's coding conventions and style guidelines.
  • All tests related to the changes have passed successfully.
  • Documentation has been updated to reflect the changes (if applicable).
  • All new and existing unit tests have passed.
  • I have self-reviewed my code and ensured its quality.
  • I have added/updated necessary comments to aid understanding.

Reviewer Checklist

  • Code has been reviewed for quality and adherence to guidelines.
  • Tests have been reviewed and are sufficient to validate the changes.
  • Documentation has been reviewed and is up to date.
  • Any questions or concerns have been addressed.

@linear
Copy link

linear bot commented Jul 26, 2023

NET-421 Add /health HTTP endpoint to rust-peer

I really-really need this to be able to have control over automated deployments.

Update one rust-peer at a time, notify on failure, roll-back etc.

It could return 200 code if rust-peer joined kademlia and all builtin services are started with some additional information in plain text like aquavm version, rust-peer version etc

@gurinderu gurinderu changed the title Feature/net 421 feat(health): Added http healthcheck endpoint Jul 26, 2023
@gurinderu gurinderu changed the title feat(health): Added http healthcheck endpoint feat(http): Added http healthcheck endpoint Jul 26, 2023
@gurinderu gurinderu force-pushed the feature/net-421 branch 2 times, most recently from b397bd9 to 0f11ca4 Compare July 26, 2023 13:31
@gurinderu gurinderu marked this pull request as ready for review July 26, 2023 13:31
@gurinderu gurinderu requested review from justprosh, folex and kmd-fl and removed request for justprosh July 26, 2023 13:32
crates/health/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@kmd-fl kmd-fl left a comment

Choose a reason for hiding this comment

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

Also, I don't quite get why we do healthcheck HTTP API and not use Prometheus

particle-services/src/app_services.rs Outdated Show resolved Hide resolved
nox/src/http.rs Outdated Show resolved Hide resolved
nox/src/connectivity.rs Outdated Show resolved Hide resolved
aquamarine/src/vm_pool.rs Outdated Show resolved Hide resolved
crates/health/src/lib.rs Outdated Show resolved Hide resolved
crates/health/src/lib.rs Outdated Show resolved Hide resolved
crates/health/src/lib.rs Outdated Show resolved Hide resolved
crates/health/src/lib.rs Outdated Show resolved Hide resolved
nox/src/health.rs Outdated Show resolved Hide resolved
nox/src/health.rs Outdated Show resolved Hide resolved
nox/src/http.rs Outdated Show resolved Hide resolved
nox/src/http.rs Outdated Show resolved Hide resolved
nox/src/http.rs Outdated Show resolved Hide resolved
@gurinderu gurinderu requested review from kmd-fl and folex July 28, 2023 10:23
@gurinderu gurinderu added the e2e Run e2e workflow label Jul 28, 2023
@gurinderu gurinderu merged commit ba2c9d1 into master Jul 28, 2023
16 checks passed
@gurinderu gurinderu deleted the feature/net-421 branch July 28, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants