HTTP Operations

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

CodeMeaningFirst check
200SuccessVerify media type and response content.
304Cached representation is validCheck the ETag or Last-Modified validator.
404Resource unavailableCheck host, path and deployment version.
502Invalid upstream responseCheck upstream reachability and protocol.
504Upstream timeoutCompare 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.