Skip to content

Tower: a cheap liveness route with the version; /health is too heavy to probe under load #1977

Backlog

Description

@waleedkadous

Problem

GET /health is Tower's heaviest read route: it builds the instance list and runs a full process census (ps) on every call. Since the fix for issue #1901 (PR #1976), every CLI command that needs Tower probes it first, and up to twice when the machine is busy, which is exactly when the census is slowest and Tower's event loop is already starved. The probe meant to tell "busy" from "down" adds to the load that makes Tower look down.

Separately, the Spec 1940 review asked for a version on a cheap route: the CLI tells an older Tower today by asking for the whole address book after a NOT_FOUND.

Ask

  1. A liveness route that does no work: no instance list, no process census, no database read. It answers with a small fixed body that includes Tower's version (and schema version, if cheap).
  2. The CLI's health probe (probeHealth in the SDK, from PR Fix #1901: tell "Tower not running" from "Tower not answering"; tower start never stops a busy Tower #1976) uses that route; /health keeps its current body for the callers that want the census (status, dashboard).
  3. The older-Tower check in afx send uses the version from the liveness route in place of the address-book probe. A Tower too old to have the route answers 404, which is itself the answer.
  4. Tests: the liveness handler calls none of the heavy functions (spy on them); the probe reports running / not-running / unresponsive against the new route and falls back correctly against a Tower without it.

Found by the builder of PR #1976 and by the Spec 1940 review. Not urgent; it removes load from the failure path.

Activity

  1. added
    area/tower
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions