get Health
Reports whether the RPC node is caught up with the cluster and safe to send traffic to.
getHealth is a liveness probe: it reports whether the backend node that answers the call considers itself healthy, meaning its slot distance behind the cluster is within an acceptable bound. It takes no parameters and resolves quickly, so load balancers, failover scripts and keepalive pings use it instead of a heavier call like getSlot.
constant-k's edge routers poll it to decide whether a backend node keeps receiving traffic. A healthy response means the node is not stale, not that every other method is fast.
Parameters
This method takes no parameters.
Result
The literal string ok when the node is healthy. An unhealthy node does not return an alternate string here — it returns a JSON-RPC error instead (see Notes).
okokNotes
- An unhealthy node replies with a JSON-RPC error, code
-32005(Node is unhealthy), whosedatapayload includesnumSlotsBehindwhen known; any error response here indicates an unhealthy node, not only that specific code. getHealthis the recommended keepalive call for long-lived WebSocket connections on constant-k.- A healthy result reflects only the one backend node that answered, not the whole constant-k fleet, so it functions as a spot check rather than a fleet-wide guarantee.