persist_comp_level

The `persist_comp_level` directive sets the compression level for cached responses in the Kaltura Media Framework's NGINX module.

Syntaxpersist_comp_level level;
Default6
Context
Arguments1

Description

The persist_comp_level directive is part of the Kaltura Media Framework (kaltura-http-api) for NGINX, allowing users to specify how aggressively responses should be compressed when cached. This affects the efficiency of both storage and transmission. Set a value between 1 and 9, where 1 indicates the least compression (faster processing and larger file sizes) and 9 indicates the most compression (slower processing and smaller file sizes). Choosing the optimal value depends on the expected load and need for performance versus bandwidth savings.

In practical terms, setting the compression level too low may result in larger cache sizes and increased bandwidth costs, while setting it too high could create delays in response time, especially under heavy load. It’s crucial to balance the server’s processing capabilities with user experience, especially in streaming contexts where quick response times are essential. This directive can contribute towards optimizing performance, particularly in video streaming scenarios where payload efficiency is crucial.

Config Example

persist_comp_level 5;

Ensure that the compression level value is between 1 and 9; otherwise, NGINX will ignore the setting.

Too high a compression level may lead to increased CPU usage, negatively impacting performance during peak loads.

Caching settings should be properly configured to ensure the effect of the compression level is effectively utilized.

← Back to all directives