fc_pkts

The `fc_pkts` directive sets the maximum number of in-flight packets for the SRT protocol in NGINX.

Syntaxfc_pkts number;
Default25600
Context
Arguments1

Description

The fc_pkts directive is used in the NGINX SRT module configuration to specify the maximum number of packets that can be in transit (or in-flight) before they are acknowledged by the receiving end. This setting is crucial for managing how the SRT protocol handles packet flow control, particularly in terms of network congestion and overall throughput. The value set for fc_pkts corresponds to the SRTO_FC option in the underlying libsrt library, which directly influences the ability of the sender to transmit packets efficiently without overwhelming the network or the receiving endpoint.

When configuring fc_pkts, it is essential to choose a number that balances network reliability and performance. A higher number allows for greater throughput but can lead to increased latency and possibly packet loss during high congestion. Conversely, a lower number can provide better reliability in unstable network conditions but may limit speed. Therefore, it is critical to test various settings when deploying SRT in scenarios with variable conditions or requirements. The directive can be applied at both the srt and server contexts, making it flexible for use in multiple configurations.

Config Example

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

Ensure that the configured value aligns with the network capacity to avoid congestion issues.

Testing different packet sizes is recommended to find the optimal setting for your specific network conditions.

← Back to all directives