beacon-APIs
beacon-APIs copied to clipboard
Update /node/health endpoint to ease integration with probe systems
Problem Somes probe systems uses HTTP status code as yes(200-2XX)/no(503) rather than yes(200)/maybe(206)/no(503), requiring complex configuration for integration (e.g: Kubernetes probes, shell scripts, ...).
To help those systems a non-breaking update of the API spec can ease the integration, adding an optional integer query parameter syncing_status to the getHealth endpoint, modifying the return status code of the maybe from 206 to the value of syncing_status.
A proposition of this update is currently implemented in Teku.
Actual behavior: An endpoint answering:
- 200 when fully functional and synced
- 206 when syncing
- 503 when the service is not functional
Desired behavior: An endpoint behaving this way:
- 200 when fully functional
syncing_status(e.g: 200, 206(default), 503 or XXX) when syncing- 503 when the service is not fully functional