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

RPC: Add get node status information #2776

Merged
merged 7 commits into from
Jan 12, 2024
Merged

RPC: Add get node status information #2776

merged 7 commits into from
Jan 12, 2024

Conversation

sieniven
Copy link
Contributor

@sieniven sieniven commented Jan 10, 2024

Summary

  • Add getnodestatusinfo RPC to get the node's health status. The RPC returns:
    • sync_to_tip flag - check whether the node's chain validation tip is fully sync-ed to the received block headers tip
    • active_peer_nodes flag - check whether the node has a minimum number of 5 connections to active peer nodes
    • health_status flag - both sync_to_tip and active_peer_nodes flags must be true for the node to be healthy status
  • Expose health endpoint APIs (/livez/, /readyz) for deployment. Pass -healthendpoints to enable health endpoint APIs.
    • /livez/ - Returns status ok response once RPCs is live.
    • /readyz/ - Returns status ok response if node's chain is fully sync-ed to latest tip and has active peer nodes (based on getnodestatusinfo).

Implications

  • Storage

    • Database reindex required
    • Database reindex optional
    • Database reindex not required
    • None
  • Consensus

    • Network upgrade required
    • Includes backward compatible changes
    • Includes consensus workarounds
    • Includes consensus refactors
    • None

@Bushstar Bushstar merged commit 76eb7e7 into master Jan 12, 2024
15 of 16 checks passed
@Bushstar Bushstar deleted the niven/health-check branch January 12, 2024 08:44
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.

2 participants