As we all know, if a server is connected to a large number of processes or tasks, it is likely to cause lag. For example, when EasyNVR is used for live video distribution, nginx connects to the video stream with a large amount of transmission, which will lead to lag in PC playback.
In order to solve this problem, we set up the on-demand live streaming mode in EasyNVR. When on-demand live is enabled, the EasyNVR service will automatically transfer the video based on its playback needs to reduce the pressure on NGINx. However, in the case of a large number of non-on-demand channels, the single NGINx processing will still slow down. To solve this problem, we need to build multiple Nginx to realize streaming.
Construction method:
1. Close the service (serviceuninstall-easynvr.exe) and copy the nginx directory as shown below.
2. Go to the directory and change the name of nginx.exe.
Similarly, nginx3 will change its directory nginx to nginx3.
3. Then modify the configuration file to change the usage of multiple nginX ports. If you do not change the usage, several NginX ports will be occupied at the same time.
Ini configuration file in the EasyNVR directory. In the easynvr.ini configuration file, multiple Nginx threads will be started.
If this paragraph does not exist, please write it yourself, save and exit after modification, restart the service to run whether it takes effect.
5. The top command in the task manager or Linux can see multiple Nginx started, and then view the video will be channel distribution.