health endpoint

A web address, often /health, that a service answers quickly to show it is up.

In more detail

Load balancers, monitoring tools and humans call it to check that a service is up and can reach what it needs. It should answer quickly and without side effects.

Examples

Checking the health endpoint as the application's own user, with become_user: app, proves the application itself can reach it.
In the APIs course: The course service answers GET /health with {"status":"ok"}, and it is the first request of the course.
curl -s http://localhost:18080/health
mux.HandleFunc("/health", health)
app/api/health/route.ts: export async function GET() { return Response.json({ status: 'ok', uptime: process.uptime() }); }
curl -s localhost:8000/healthz returns {"status": "ok"} from the course service even while other routes fail: it measures the process, not the work.

Related terms

Taught in

References

Certification courses