ts_kmp_max_republishes
The `ts_kmp_max_republishes` directive limits the maximum number of times a media stream can be republished in NGINX using the Kaltura Media Framework.
Description
The ts_kmp_max_republishes directive is specifically used within the context of the Kaltura Media Framework to manage the handling of media streams. By setting this directive, administrators can control how many times a stream may be republished during its lifecycle. This is especially useful in live streaming environments where it's crucial to avoid excessive republishing that could lead to resource exhaustion or performance degradation.
In practice, the value specified for ts_kmp_max_republishes represents the integer maximum number of republishing attempts that are allowed. When the configured limit is reached, any further attempts to republish will be rejected, ensuring that the system remains efficient and stable. The directive is effective in scenarios where streams might encounter issues, and the system needs to mitigate unnecessary overhead by limiting republishing retries.
Administrators should consider the expected load and user behavior when configuring this directive, as setting a value that is too low might prevent legitimate stream reconnections during brief interruptions, while a value too high might strain the server resources if too many consumers attempt to republish simultaneously. Therefore, careful tuning based on actual usage patterns and resource availability is recommended.
Config Example
stream {
server {
ts_kmp_max_republishes 5;
}
}Ensure that the value set does not cause legitimate stream connections to be dropped.
Setting a very high value may lead to resource waste or performance issues if too many republish attempts are allowed.
Monitor application logs to determine if legitimate republishing is being denied due to a low threshold.