The current limit of 128 video streams per server is an architecture related restriction which has existed since the days of Nx's first product - the Eve Media Player.
While processing a media stream a server creates up to 4 threads:
- Thread 1: Reads high quality RTSP stream from camera
- Thread 2: Reads low quality RTSP stream from camera
- Thread 3: Processes high quality RTSP stream and mux it to mkv
- Thread 4: Processes low quality RTSP stream and mux it to mkv
Based on the above 128 cameras can require up to 512 threads.
While there is no hard 512 thread limitation in modern Operating Systems our QA and Testing teams found that when we surpass 512 we notice a very large degradation in system performance.
In order to overcome this issue we'll have to refactor the code at some point - but for now we've set the limit to 128 cameras per server to ensure good performance for our users.