Flussonic Media Server Documentation

Cache

To speed up the broadcasting of VOD, you can use the SSD cache.

To configure caching, for original files from the cloud or HTTP server the cache option is used.

For files on SSD drives, you need to use intermediate SSD caching of video file segments, and the option for this is segment_cache.

File caching on SSD

You can ask Flussonic Media Server to save not chunks, but file content on disk, when the source is a cloud or a remote HTTP server (such as another Flussonic).

This mechanism can allow you to build a distributed CDN from several Flussonics because now even downloading will lead to caching a whole file.

Flussonic Media Server will not download the same content twice, so simultaneous access to a file is collapsed into single upstream request.

Important! For file cache, do not use SSD partitions that were mounted with the option noatime.

Here is the configuration for file cache:

file vod_remote {
  path s3://minioadmin:minioadmin@minio:9001/test;
  cache /storage/cache 400G;
  download;
}

Such configuration will download files on /mount/ssd on request: only requested data will be available locally.

Caching based on the number of requests

You can define a condition for placing files in cache — this condition is how often a file was requested by clients.

The option misses=3 tells Flussonic that if this file was requested more than 3 times, it must be cached:

file vod_remote {
  path s3://minioadmin:minioadmin@minio:9001/test;
  cache /storage/cache 400G misses=3;
  download;
}

Choosing cache options in the UI

To set cache options for file in the Flussonic UI:

  1. In VOD (Files) click thе file that you want to cache.
  2. Open the Output tab and edit the Cache section.

VOD cache

Segment cache for SSD

Today, one of the most popular ways to speed up serving content from a disk is using SSD storage.

Since solid state drives cost significantly higher than traditional HDs, quite often it makes sense to use the setup that involves intermediate SSD caching.

Flussonic Media Server can automatically cache the requested chunks for HLS and HDS on a disk, which allows to speed up delivery considerably. Specify the following configuration:

file vod1 {
    paths /mount/hdd1 /mount/hdd2 /mount/hdd3;
    segment_cache /mount/ssd1 20G 48h misses=2;
}

With this configuration, Flussonic Media Server maintains the cache size limit of 20GB, deletes files older than 2 days, and caches only the files requested more than twice.

Important! We do not recommend using segment_cache for traditional HD drives!