Skip to main content

Parameters

This method does not take any parameters.

Response

string
One of the following status values:
  • "ok": Node is healthy and up-to-date
  • "behind": Node is behind by some number of slots
  • "unknown": Node health cannot be determined

Code Examples

Basic Request

Alternative HTTP GET Request

Using web3.js

Notes

  1. This method is commonly used for load balancer health checks
  2. The HTTP GET endpoint /health provides the same information
  3. A node is considered “behind” if it’s more than HEALTH_CHECK_SLOT_DISTANCE slots from the latest cluster slot
  4. The “unknown” status typically indicates the node is bootstrapping or having issues

Best Practices

  1. Use this endpoint for basic health monitoring
  2. Implement circuit breakers based on health status
  3. Consider using more detailed methods for specific health metrics:
    • getVersion for software version
    • getSlot for slot progress
    • getBlockHeight for block height
  4. Set appropriate timeouts for health checks
  5. Handle all possible response values

Common Errors

Use Cases

  1. Load Balancer Configuration
  2. Health Monitoring
  3. Client-Side Load Balancing
  4. System Status Dashboard