proxy_pass

The `proxy_pass` directive in the NGINX SRT Module routes incoming SRT connections to a specified TCP backend.

Syntaxproxy_pass URL;
Defaultnone
Context
Arguments1

Description

The proxy_pass directive is crucial for defining how incoming Secure Reliable Transfer (SRT) streams are redirected to a TCP backend service. This directive requires a single argument, which is the destination URL, usually specified in the form of tcp://IP:Port. By doing so, the NGINX server listens on specified ports for SRT traffic and forwards this traffic directly to your TCP backend, ensuring clients can effectively communicate with your services.

The use of the directive typically follows the listen directive, where it establishes an SRT server context. It allows NGINX handling of SRT streams, transforming them into TCP stream communications through link routing. This arrangement is essential for reliably managing streaming applications that require the inherent resilience and low-latency characteristics of SRT while providing compatibility with legacy systems or services expecting TCP connections.

Parameters such as timeouts and buffer sizes, defined in other related directives, may also impact the behavior when using proxy_pass. Ensuring these values are appropriately set will optimize the performance and reliability of data streaming between SRT and TCP domains.

Config Example

srt {
    server {
        listen 4321;
        proxy_pass tcp://127.0.0.1:5678;
    }
}

Ensure that the specified backend server is up and reachable; otherwise, streaming will fail.

Verify that firewall rules allow traffic on the specified ports to avoid connectivity issues.

Make sure to configure appropriate buffering settings to prevent packet loss, especially under high load.

← Back to all directives