async fn health(__arg0: State<AppState>) -> ResponseExpand description
GET /health
status is liveness: it is "ok" whenever this process can schedule a
task to answer at all, which is what a load balancer’s health check
should gate traffic on — see crates/didbot-serve/src/health.rs for why
that is a different claim from progress, which reports whether the
deployment’s own heartbeat tick is still advancing rather than merely
whether a socket accepted.
certificates is the second claim, and the one an alarm can be pointed
at: the deployment’s health checks read it for certificate state,
and a renewal that keeps failing reaches expiry — a total outage for
every hostname in the zone — over weeks. Carried in this same response
rather than on a route of its own so the check already being made says
it; see crates/didbot-serve/src/health.rs.
oauthPushes is the third, and it is here because POST /oauth/par
cannot say it anywhere else: that endpoint is unauthenticated, so it
answers a flood aimed at one account exactly as it answers an ordinary
push, and the log line it writes is sampled. These are counts since this
process started, so an operator watches them move rather than reading a
level; see crate::oauth::par::DroppedPushes.
foreignRecords is the fourth, and the same shape: counts since the
process started, from the one reader policy evaluation reads other
people’s repositories through. refusals is separated from unknowns
because a refusal is this deployment’s own decision and an unknown is
somebody else’s outage, and an operator watching either number climb
wants to know which it is looking at. See didbot_lookup::Counts.
disk is the fifth: the data volume’s freeBytes and totalBytes,
read as this request is answered, and alert, the lowest free-space
watermark it is below. It is null for a run with no --data. See
crate::health::HealthState::disk.
firehose is the sixth: how many subscribeRepos consumers are
attached right now, and the newest sequence number assigned. A relay
that has stopped reading is consumers at zero while newestSeq moves.
revision is the commit the binary was built from, or null for a build
that was not told; see crate::health::REVISION. A deploy waits for it
to name the commit it shipped.