Learn getHealth use cases, code examples, request parameters, response structure, and tips.
getHealth
endpoint is used to check the current health status of a Solana RPC node. A healthy node is generally considered to be one that is operational and reasonably synchronized with the rest of the cluster (specifically, within a certain slot distance of the latest cluster confirmed slot, known as HEALTH_CHECK_SLOT_DISTANCE
).
This endpoint is crucial for monitoring node health, especially for applications or infrastructure that rely on the availability and reliability of an RPC node.
getHealth
method uses the standard JSON-RPC POST mechanism with the method getHealth
. This method checks if the RPC node is healthy and synchronized with the Solana cluster.
getHealth
POST:
result
: "ok"
if the node is healthy."behind"
or "unknown"
) if unhealthy, though the exact error response for an unhealthy node can be unstable or vary between providers.HEALTH_CHECK_SLOT_DISTANCE
) can be configured on the node."behind"
or "unknown"
: If you receive "behind {distance}"
or "unknown"
, the node is operational but may not be fully caught up or able to ascertain its status relative to the cluster. Depending on your application’s requirements, you might treat these states differently.getHealth
, as network issues or node problems can cause the request to fail entirely.getHealth
endpoint for monitoring the status of a Solana RPC node.