L4/L7 Timeout
TOC
Basic Concepts
L4/L7 timeout is a feature provided by ALB. It is used to configure the timeout time for L4/L7 proxy.
Timeout is implemented through a Lua script, and Nginx does not need to reload when it is changed.
CRD
Config can be configured on:
- Frontend:
.spec.config.timeout - Rule:
.spec.config.timeout
What Timeout Means
There are three types of timeouts:
-
proxy_connect_timeout_ms: Defines the timeout for establishing a connection with the upstream server. If the connection cannot be established within this time, the request will fail.
-
proxy_read_timeout_ms: Defines the timeout for reading a response from the upstream server. The timeout is set between two successive read operations, not for the entire response. If no data is received within this time, the connection is closed.
-
proxy_send_timeout_ms: Defines the timeout for sending a request to the upstream server. Similar to the read timeout, this is set between two successive write operations. If no data can be sent within this time, the connection is closed.
Ingress Annotation
Port Level Timeout
You can configure timeout on a port directly, which is used as an L4 timeout.