Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support upstream HTTP connection timeouts #2401

Closed
guydc opened this issue Jan 4, 2024 · 0 comments · Fixed by #2411 or #2454
Closed

Support upstream HTTP connection timeouts #2401

guydc opened this issue Jan 4, 2024 · 0 comments · Fixed by #2411 or #2454
Assignees
Labels

Comments

@guydc
Copy link
Contributor

guydc commented Jan 4, 2024

Description:
Envoy supports a variety of upstream connection timeouts that impact persistent HTTP connections establishment and lifecycle:

  • Cluster connect timeout: timeout for establishing a TCP connection. If TLS is used, the timeout also applies to TLS session setup. The Envoy default is 5s. The Envoy Gateway default is 10s.
  • HTTP proxy idle timeout: Idle connections (without active requests) are closed after this time. Envoy default is 60m.
  • HTTP proxy max connection duration: When the max connection duration is reached, HTTP persistent connections are closed (irrespective of the connection's idleness). The default value is unlimited.

Envoy Gateway should support configuration of these timeouts for upstream connections. Below are some examples and use cases:

  • Cluster connect timeout:
    • Envoy Gateway default values prioritize security. However, other proxies like nginx use 60s as a default for connect timeout, indicating that longer connection establishment times are possible.
    • Users may need to increase this value. For example, when the latency to the backend is significant, the TCP/TLS handshake may not finish in time.
  • HTTP Idle timeout:
  • HTTP max connection duration:
    • While the default value is not disruptive, Envoy docs mention that setting a maximum age is beneficial for cleanup of connections to targets that are no longer discoverable with DNS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants