Slicing Cache Files into Smaller Files

A CDN edge server stores and caches an entire file upon user’s request. For large files, e.g., videos larger than 1 GB, the CDN edge server may be overloaded even if the user spent watching only the first few minutes of the video.

The slice module allows to split a file into smaller files and cache the specified duration on the edge server. It reduces the disk space waste and improves the edge server's stability and performance.

The slice operations are carried out on the backend and can only be verified using a raw log:

  • A 1-GB test file prepared and configured to be split every 2 MB
  • The $body_bytes_sent variable displays 2, 000 bytes in the raw log below:
00:00:00 +0000 123456789 GET /testfile.txt 200 1086 HIT 0.000 0.002 110972 234567891 345678912 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36 - 2000 456789123 TLSv1.3 - - - - - - - - V8

Currently, it is a beta feature. To enable it in your CDN resources, contact OnApp Support.