cockroachdb / cockroachdb/cockroach
server: improve health check
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Currently, the `/health?ready=1` health check only checks that the node operational (not initializing or draining) and that that the SQL server has started.
https://github.com/cockroachdb/cockroach/blob/56ce47516c071274e4ffda2cfaddbb798a52ba3e/pkg/server/admin.go#L2165-L2176
It should include additional conditions. In particular, it should ensure a SQL gateway is connected to a majority quorum of ranges -- a gateway that is partitioned away from the quorum and can't serve traffic should fail health checks. This is not a local decision, but depends on the connectivity of other reachable nodes.
Related to https://github.com/cockroachdb/cockroach/issues/62731.
Jira issue: CRDB-34472
Contributor guide
Assessment
This issue has not been assessed yet.