Why choose nginx
Reason 1 IO multiplexing epoll
1. When the fd is ready, put the fd between the callback functions of the system, which is more efficient
2. Unlimited maximum number of connections cat /proc/sys/fs/file-max
Reason 2 Lightweight
Fewer functional modules, code modularization
Reason 3 cpu affinity
Bind the cpu core to the nginx worker process, and fix each worker process to execute on one cpu, reduce the cache miss of switching cpu, and obtain better performance
Reason 4 sendfile
0 copy transfer mode, transfer between kernel spaces