kmp_flush_timeout
The `kmp_flush_timeout` directive sets the timeout duration for flushing Kaltura Media Protocol (KMP) buffers during streaming operations.
Description
The kmp_flush_timeout directive is utilized within the Kaltura Media Framework's NGINX module to specify a timeout period for the flushing of buffers in KMP-based streaming processes. When a KMP stream is active, the server may need to flush certain data to ensure smooth delivery of streaming media. This flushing is critical in live streaming scenarios where latency and buffer management directly affect the viewer experience.
The parameter for this directive is specified in seconds and determines how long the server will wait for any pending buffer flush operations to complete before timing out. If the flush does not happen within this allotted time, the server may take additional actions, such as dropping the stream or returning an error message to the client. Setting an appropriate value for this timeout is essential to balance between responsiveness and the capacity of the streaming server to handle multiple requests efficiently.
When tuning the kmp_flush_timeout, it is crucial to consider the overall server performance, network conditions, and specific use cases of the media being delivered. For instance, a low timeout value might result in frequent stream interruptions under high load or variable network conditions, whereas a very high value could lead to increased latency in responding to playback interruptions or errors.
Config Example
kmp_flush_timeout 30s;
Setting the timeout too low may lead to interruptions in streaming, especially during high load situations.
Conversely, setting a timeout too high can cause delays in error handling for stream failures.
This directive requires proper contextual placement to function as intended; ensure it is defined in the correct configuration block.