X-Envoy-Upstream-Service-Time

The HTTP X-Envoy-Upstream-Service-Time response header is an unofficial HTTP header added by the Envoy proxy to report how long the upstream service took to process the request, measured in milliseconds.

Note

The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.

Usage

Envoy is a high-performance proxy originally built at Lyft and now maintained by the Cloud Native Computing Foundation. Envoy sits between clients and backend services, handling load balancing, observability, and traffic management. The proxy powers the data plane in Istio service mesh, Google Cloud infrastructure (GKE ingress, Cloud Run), AWS App Mesh, and a wide range of Kubernetes deployments.

When Envoy forwards a request to an upstream service and receives a response, the proxy measures the total time from sending the request to receiving the response. This duration, expressed as an integer in milliseconds, appears in the X-Envoy-Upstream-Service-Time header. The value includes both upstream processing time and the network round-trip between Envoy and the upstream host. Time spent in Envoy itself or in network transit between the client and the proxy is excluded.

The header is useful for isolating backend latency from total response time. A high value relative to the total round-trip time points to slow upstream processing. A low value with a high total round-trip time suggests network latency or proxy-layer overhead. Operations teams monitoring services behind Envoy use this header to triage performance issues without distributed tracing infrastructure.

The standardized Server-Timing header provides a vendor-neutral alternative for exposing server-side timing data.

Values

Milliseconds (integer)

The value is a non-negative integer representing the time Envoy waited for the upstream to respond, in milliseconds, including upstream processing time and network latency between Envoy and the upstream host. A value of 1 means the upstream responded in approximately one millisecond. A value of 919 means the upstream took close to a full second.

Example

A fast upstream response where the backend processed the request in 2 milliseconds. This typically indicates a cached response or a lightweight operation on the upstream service.

X-Envoy-Upstream-Service-Time: 2

A slower response where the upstream service took 164 milliseconds. This range is common for dynamic page generation, database queries, or API calls involving multiple internal services.

X-Envoy-Upstream-Service-Time: 164

A response from a service under load where the upstream took 919 milliseconds to respond. Values approaching or exceeding one second often indicate resource contention, complex queries, or degraded backend performance.

X-Envoy-Upstream-Service-Time: 919

Takeaway

The X-Envoy-Upstream-Service-Time header reports how many milliseconds Envoy waited for the upstream to respond. The value includes upstream processing time plus network latency between Envoy and the upstream host, excluding client-to-proxy transit. This makes the header a practical performance debugging signal in Envoy-based architectures.

See also

Last updated: March 6, 2026