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/healthmux.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
- become — The Ansible keyword that switches on privilege escalation, so a task or a whole play runs as another account, root by default.
- command module — The module that runs any program you name on the host and reports what it printed, without being able to tell whether it changed anything.
- endpoint — An address that a program sends requests to, such as a web path like /health or a network socket.
- load testing — Measuring how a system behaves while a chosen amount of traffic is sent to it, to find its latency, throughput and limits.
- health check — A regular automated test of whether a program or service is working, such as a request to its health endpoint or a command run inside its container.
- curl — A command-line tool for sending web requests and printing the response.
- process uptime — How long a service or process has been running, or the share of time it has been available.
- 200 OK — The HTTP status meaning the request worked and the body holds the answer.
Taught in
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- What An API Is, And The Alternatives — Modern API Architecture: REST, GraphQL & gRPC
- Load Testing — Modern API Architecture: REST, GraphQL & gRPC
- Probes And Health Checks — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Port Publishing, Localhost And Network Troubleshooting — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Development Overrides, Hot Reloading And Debuggers — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Serving HTTP with net/http Server — Concurrent Systems Programming with Go
- Containerizing and Testing the Final Build — Concurrent Systems Programming with Go
- Route Handlers: RESTful Endpoints with NextRequest — Next.js 15 & Modern App Router Architecture
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services
- Observability Versus Monitoring — Full-Stack Observability: Metrics, Tracing & Logging
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- A Worked Example Postmortem — Full-Stack Observability: Metrics, Tracing & Logging
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
References
- Kubernetes: configure liveness, readiness and startup probes
- Microsoft REST API Guidelines
- Dockerfile reference: HEALTHCHECK
- Next.js 15 docs: Route Handlers and Middleware
- Google SRE book: monitoring distributed systems
- Azure Architecture Center: Health Endpoint Monitoring pattern
- Amazon Builders' Library: Implementing health checks