send_latency
The send_latency directive controls the latency settings for outgoing SRT streams in NGINX.
Description
The send_latency directive is part of the NGINX SRT module, specifically designed to configure the maximum acceptable latency for sending data over the SRT (Secure Reliable Transport) protocol. It allows administrators to set how long the NGINX server may hold outgoing packets before sending them. This is particularly useful in scenarios where latency management is critical, such as live streaming, where too little latency may cause buffer underruns while too much can lead to decreased perceived video quality or synchronization issues.
The send_latency directive accepts a single argument that specifies the desired latency, which can be thought of as a scheduling delay introduced before packet transmission. This is not measured in seconds or milliseconds directly in the configuration; rather, it's often specified in terms of other units that the SRT library can interpret (such as packets or bytes). By tuning this setting, NGINX users can balance between responsiveness and data integrity, potentially enhancing user experience by providing smoother stream playback and reducing jitter.
When used effectively, send_latency can mitigate issues with network instability or high traffic, ensuring that packets are sent at a controlled rate, thus maintaining quality of service (QoS) across distributed systems. However, it’s important to consider network characteristics and bandwidth capacities when adjusting this parameter to avoid unnecessary delays in streaming transmission.
Config Example
srt {
server {
listen 4321;
send_latency 1000; # Sets latency to 1000 microseconds
proxy_pass tcp://127.0.0.1:5678;
}
}Setting latency too low may cause packet drops and increased jitter, leading to playback issues.
Setting latency too high can cause significant delays in streaming, negatively impacting real-time applications.
Ensure that the specified value is suitable for the network environment to avoid unwanted streaming interruptions.