kmp_cc_out_timeout
The `kmp_cc_out_timeout` directive sets the timeout duration for output connections in the Kaltura Media Framework module.
Description
The kmp_cc_out_timeout directive is used in the contexts of stream and stream server to specify how long NGINX should wait for a response from Kaltura's media processing components before timing out. When streaming media, it is essential to maintain a balance between responsiveness and resource utilization. This directive helps in configuring the timeout period based on the deployment scenario, ensuring that connections to the processing components do not hang indefinitely. Timeouts can be critical in preventing resource exhaustion during peak usage periods or when there are network issues.
When the timeout value is reached, the connection will be closed, and an error will be returned to the client. This helps to free up system resources that would otherwise be occupied by stuck connections. The configured timeout value is expected in seconds and should be set according to the expected latency and performance characteristics of the network and media processing components. Care should be taken to set this value too low, as it may lead to premature timeout errors in scenarios with high latency, especially in geographically distributed deployments.
To use the kmp_cc_out_timeout directive effectively, it is essential to analyze the performance data of your media pipeline and adjust the timeout value accordingly to optimize throughput while ensuring a snappy user experience.
Config Example
stream {
server {
kmp_cc_out_timeout 30;
# Other stream directives...
}
}Setting the timeout too short may lead to frequent timeouts under heavy load or high latency, impacting user experience.
Make sure to test timeouts in a staging environment before deploying to production to avoid unnecessary connection drops.