live_kmp_send_timeout
The `live_kmp_send_timeout` directive sets the timeout for sending data in live streaming scenarios using the Kaltura Media Protocol (KMP).
Description
The live_kmp_send_timeout directive configures the maximum time that the NGINX server will spend sending data to clients when utilizing the Kaltura Media Protocol. This timeout is particularly important in live streaming applications where maintaining a continuous flow of media without interruptions is crucial for user experience. When the configured timeout is exceeded, NGINX will terminate the connection rather than waiting indefinitely for the client to receive the data.
This directive accepts a single argument, which specifies the timeout duration. It can be set to any appropriate time value, such as seconds or minutes. Specifying a value that is too short may lead to unintended disconnections in scenarios with variable network conditions, while an excessively long timeout could hold resources unnecessarily during network issues.
In practice, tuning the live_kmp_send_timeout is essential depending on factors such as network stability, expected audience size, and streaming quality. A suitable configuration helps in performance management and ensures that server resources are allocated efficiently during high-traffic streaming events.
Config Example
stream {
server {
live_kmp_send_timeout 30s;
}
}Setting the timeout too low may cause frequent disconnections during live streaming, impacting user experience.
Ensure the timeout value aligns with the expected network conditions (e.g., network latency, bandwidth) to avoid unnecessary dropped connections.