pckg_expires_master
The 'pckg_expires_master' directive configures the expiration time for master media packages in the Kaltura Media Framework.
Description
The 'pckg_expires_master' directive in the Kaltura Media Framework Common NGINX Module allows you to specify the expiration time for master media packages. This directive is especially useful when managing resources for live streaming or media playback, as it helps control how long the declared media packages are available before being considered outdated or stale. By setting this directive, administrators can balance between content freshness and resource utilization, ensuring that unnecessary files do not linger on the server longer than necessary, which could consume storage and processing resources.
The directive can be set at http, server, or location context levels, allowing for quite a bit of flexibility in configuration. When used, it expects a single argument, which typically defines the duration (e.g., '30m' for 30 minutes). Upon expiration, the media package may be automatically cleaned up or marked as inactive, depending on the underlying implementation of the Kaltura Media Framework. Administrators should ensure they understand the implications for user experience, particularly in live streaming scenarios where content needs may change rapidly.
As a best practice, it’s essential to monitor server performance and media access patterns to determine the most suitable expiration duration. If the package expiration is set too short, it may lead to a negative user experience due to delays in content availability. Conversely, setting it too long may result in the server holding on to stale content unnecessarily, thus wasting resources.
Config Example
http {
pckg_expires_master 30m;
}Using an invalid time format may lead to errors in the configuration.
Ensure that the expiration time aligns with the media lifecycle to avoid content availability issues.
Setting a very short expiration time could lead to frequent reloads of media, impacting server performance.