HTTP reference
Response codes and headers to keep at hand when writing health checks and troubleshooting client requests.
Health and readiness
Use a lightweight liveness check to monitor the process. Readiness can also check dependencies required to serve traffic. The handbook exposes a simple liveness response on /healthz.
Status codes
| Code | Meaning | First check |
|---|---|---|
| 200 | Success | Verify media type and response content. |
| 304 | Cached representation is valid | Check the ETag or Last-Modified validator. |
| 404 | Resource unavailable | Check host, path and deployment version. |
| 502 | Invalid upstream response | Check upstream reachability and protocol. |
| 504 | Upstream timeout | Compare the gateway deadline with origin latency. |
Cache behavior
Use validators for HTML that can change. Give immutable versioned assets a longer lifetime. Keep authenticated or user-specific responses out of shared caches.