Parameters
This method does not take any parameters.Response
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
- This method is commonly used for load balancer health checks
- The HTTP GET endpoint
/healthprovides the same information - A node is considered “behind” if it’s more than
HEALTH_CHECK_SLOT_DISTANCEslots from the latest cluster slot - The “unknown” status typically indicates the node is bootstrapping or having issues
Best Practices
- Use this endpoint for basic health monitoring
- Implement circuit breakers based on health status
- Consider using more detailed methods for specific health metrics:
getVersionfor software versiongetSlotfor slot progressgetBlockHeightfor block height
- Set appropriate timeouts for health checks
- Handle all possible response values
Common Errors
| Code | Message | Solution |
|---|---|---|
| -32601 | Method not found | Verify you’re connected to a Solana RPC node |
| -32603 | Internal error | Node may be experiencing issues |
| 503 | Service Unavailable | Node is not ready to handle requests |
Use Cases
-
Load Balancer Configuration
-
Health Monitoring
-
Client-Side Load Balancing
-
System Status Dashboard