srt_proxy_stream_id

The `srt_proxy_stream_id` directive specifies a unique identifier for SRT streams in NGINX SRT configuration.

Syntaxsrt_proxy_stream_id number;
Defaultnone
Contextstream, stream server
Arguments1

Description

The srt_proxy_stream_id directive is used within the stream or stream server context in the NGINX SRT module to assign a unique stream identifier to SRT streams. This identifier plays a crucial role in managing stream sessions effectively, particularly in distinguishing between multiple stream connections and ensuring accurate routing and handling of data packets over the SRT protocol.

The directive accepts a single numeric argument that represents the stream ID. When set, this ID is applied to the respective SRT stream connection, allowing the NGINX server to refer back to the specific stream for various operational tasks, including logging, monitoring, and managing resource allocation. Ensuring that each stream has a distinct ID helps prevent confusion between concurrent streams that may share the same endpoint or transport method.

As the NGINX SRT module leverages the underlying capabilities of the SRT protocol for secure and reliable real-time transport, specifying unique stream identifiers becomes especially important in complex configurations involving multiple streams. This identification system aids in the performance optimization and scalability of applications utilizing SRT for data transfer.

Config Example

stream {
    server {
        listen 5432;
        srt_proxy_pass srt://127.0.0.1:4321;
        srt_proxy_stream_id 1;
    }
}

Ensure that each stream has a unique ID to avoid conflicts.

Using the same ID for different streams may lead to routing errors or data loss.

The stream ID should be carefully managed in high-traffic scenarios to maintain performance.

← Back to all directives