proxy_timeout
The `proxy_timeout` directive configures the timeout period for the SRT proxy connections in NGINX.
Description
The proxy_timeout directive, part of the NGINX SRT module, specifies the duration that the SRT proxies should wait for a connection to be established with a specified peer before timing out. It plays a critical role in scenarios where the SRT stream is expected to communicate with a remote TCP endpoint, buffering for reliable transfer. This timeout setting helps manage resource utilization by avoiding prolonged waits during connection issues or peer unavailability. The value set for proxy_timeout can significantly affect the responsiveness of the application, especially under fluctuating network conditions.
In practical applications, the proxy_timeout must be carefully configured based on expected network latencies and the nature of data transmission used through SRT. A shorter timeout may lead to aborting essential connections prematurely, while a longer timeout might waste server resources and potentially degrade application performance. Parameters can be adjusted based on experimental or production feedback, emphasizing the need for monitoring and tuning in line with operational conditions.
Config Example
srt {
server {
listen 4321;
proxy_timeout 30s;
proxy_pass tcp://127.0.0.1:5678;
}
}Setting a timeout that is too short can result in frequent dropped connections and might harm the reliability of the stream.
A longer timeout without proper server resources can lead to exhaustion issues under heavy load.