HLS proxy-cache through Nginx
Why a HLS proxy cache?
MistServer creates an individual feed for every viewer from one input. This has great advantages in that every viewer has their own feed and cannot affect each other. This however is not an advantage when you're recreating the same fragments for everyone especially when TS fragment generation is one of the more CPU intensive tasks when it comes to packaging.
So the HLS proxy cache allows you to store a segment temporary and forward it to any viewer requesting the same segment after the first. Basically create it once, then re-use it while it's in buffer and finally remove it when it should no longer be available. This lowers the CPU usage for every viewer after the first requester significantly.
Playlists will be at the normal address location, segments however will all be forwarded to a local recorded file location & shared through Nginx.
Why Nginx?
Honestly, every webserver can handle this. The major reason why we pick Nginx is that it's something we're familiar with and know how to set up. It does help that it often comes out slightly ahead of other web servers when tested online, however if we were to be honest the differences are minimal. So you can use this setup for any other web server as well, you would just have to look up how a reverse proxy is set up or feel free to contact us for help if you really cannot figure it out.
Requirements
- Webserver application (Nginx)
- MistServer development version (script below)
- Text editor