ts_kmp_timeout
The `ts_kmp_timeout` directive specifies the timeout duration for Kaltura Media Protocol (KMP) connections in streaming contexts.
Description
ts_kmp_timeout is utilized within the Kaltura Media Framework Common NGINX Module to define the maximum duration that a KMP connection is allowed to remain idle before it is closed. This directive is crucial for managing resource utilization on the server, particularly in environments with high traffic and many simultaneous connections, which is typical in media streaming applications. When a connection exceeds the designated timeout period without any data being exchanged, it is automatically terminated to free up resources, thereby enhancing the overall performance and efficiency of the streaming service.
The syntax of the ts_kmp_timeout directive requires a single argument, which is set in the form of a time duration (e.g., 30s, 1m), indicating how long the connection can remain idle. It is important to configure this value appropriately based on the expected traffic patterns and connection lifetimes to avoid premature disconnections that could result in interrupted streaming experiences for users.
The directive is applicable in both the stream context and stream server context, allowing it to be fine-tuned at various levels of the NGINX configuration. Properly managing this timeout can directly affect user experience and server load, making it a vital setting for administrators of media streaming services utilizing the Kaltura framework.
Config Example
stream {
server {
ts_kmp_timeout 30s;
}
}Setting the timeout too low may lead to unintended disconnections during high-latency conditions or slow network paths.
Ensure that the timeout value aligns with the expected KMP connection usage patterns to prevent disruptions.