Search code examples
lighttpdhttp-live-streaming

Lighttpd limit download connections global/overall


could you help me to limit the downloads on lighttpd? I'm use Lighty to provide HLS stream to my Customers (downloading .TS/M3U8 Files to get live stream). My server have 1 Gbit upload BW and when there are too many users they are watching the stream, the stream lagging and freezing. How can i tell Lighty to acceppt only like 800 Users they can access the .TS or .M3U8 files at same time?


Solution

  • You can limit the number of connections to lighttpd with server.max-connections = 800 Or by limiting file descriptors i.e. server.max-fds = 1600 However this wont give you the nice fall back you are looking for.

    I would suggest handling this problem by handling the stream in a scripting language such as php or nodejs.