Skip to content
Help guide the future of agentgateway — Take the survey

About timeouts

Page as Markdown

Learn about timeout types and how to configure them for your services.

A timeout is the amount of time (duration) that the gateway waits for replies from a backend service before the service is considered unavailable. This setting can be useful to prevent your apps from hanging or to fail if no response is returned in a specific timeframe. With timeouts, calls either succeed or fail within a predictable timeframe.

The time an app needs to process a request can vary a lot. For this reason, applying the same timeout across services can cause a variety of issues. For example, a timeout that is too long can result in excessive latency from waiting for replies from failing services. On the other hand, a timeout that is too short can result in calls failing unnecessarily while waiting for an operation that needs responses from multiple services. Set app-specific timeouts instead of a single timeout.

Configuration options

You can configure different types of timeouts by using a Kubernetes Gateway API-native configuration or an AgentgatewayPolicy as shown in the following table.

Type of timeoutDescriptionConfigured viaAttach to
Request timeoutA request timeout is the time the proxy allows from the start of a request until the response headers arrive from the backend. The request timeout does not limit the response body. To end a response that stalls after its headers, use a response idle timeout.
  • HTTPRoute
  • AgentgatewayPolicy
  • HTTPRoute
  • HTTPRoute rule
  • Gateway listener (AgentgatewayPolicy only)
Idle timeoutAn idle timeout is the time when the proxy terminates the connection to a downstream or upstream service if there are no active streams.
  • AgentgatewayPolicy
  • Gateway listener
Per-try timeoutSet a shorter timeout for retries than the overall request timeout.
  • HTTPRoute
  • AgentgatewayPolicy
  • HTTPRoute
  • HTTPRoute rule
  • Gateway listener (AgentgatewayPolicy only)
Response idle timeoutA response idle timeout is the time the gateway waits for the next frame from the upstream response body. Set it with traffic.timeouts.responseIdle; response processing and client backpressure do not count.
  • AgentgatewayPolicy
  • HTTPRoute
  • HTTPRoute rule
  • Gateway listener
Backend connection timeoutA backend connection timeout is the time the proxy allows for a TCP connection to the destination to be established. Set it with backend.tcp.connectTimeout.
  • AgentgatewayPolicy
  • Gateway
  • Gateway listener
  • HTTPRoute or GRPCRoute
  • Route rule
  • Kubernetes Service
  • AgentgatewayBackend
Backend response timeoutA backend response timeout is the time the proxy allows for the complete HTTP response to be received from the destination. Set it with backend.http.requestTimeout.
  • AgentgatewayPolicy
  • Gateway
  • Gateway listener
  • HTTPRoute or GRPCRoute
  • Route rule
  • Kubernetes Service
  • AgentgatewayBackend
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate ↵ select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.