Add Health Check Endpoint for Node Types in Handlers and Routes #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description: Implement Health Check Endpoint for Node Types
Summary of Changes
This pull request introduces a health check endpoint across multiple node types within the network. The following changes have been made:
health_checkfunction inhandlers.rs.routes.rsto add the.or(...)block for thehealth_checkhandler in the routing logic for each node type: User, Storage, Mempool, Miner, and Miner+User.Motivation
The addition of a health check endpoint allows for better monitoring and stability of the network. It provides developers and operators insight into the operational status of various node types and improves overall system reliability.
Relevant Context
Health checks are vital in distributed systems to ensure that each component is functioning correctly. Integrating this endpoint across all node types enables centralized health monitoring and aids in troubleshooting potential issues.
Testing Instructions
To verify the implementation:
Start the server.
Send GET requests to the
/healthendpoint for each node type:/health/user/health/storage/health/mempool/health/miner/health/miner_userEnsure that the expected health check response is received from each endpoint.
Known Issues/Limitations
We appreciate any feedback on this implementation to enhance the health monitoring capabilities of our network. Thank you!