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.
Config can be configured on:
.spec.config.timeout
.spec.config.timeout
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.
Annotation | Description |
---|---|
nginx.ingress.kubernetes.io/proxy-connect-timeout | Corresponds to proxy_connect_timeout_ms in CR |
nginx.ingress.kubernetes.io/proxy-read-timeout | Corresponds to proxy_read_timeout_ms in CR |
nginx.ingress.kubernetes.io/proxy-send-timeout | Corresponds to proxy_send_timeout_ms in CR |
You can configure timeout on a port directly, which is used as an L4 timeout.