Super-detailed analysis of Nginx configuration files – data organization
#Run user user nobody; #Start the process, usually set to be equal to the number of cpu worker_processes 1; #Global error log and PID file #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; #Working mode and connection limit events { #epoll is a way of multiplexing IO (I/O Multiplexing), #Only used for kernels above linux2.6, which can greatly improve the performance of nginx use epoll; #The maximum number of concurrent connections for a single background worker process worker_connections 1024; # The total number of concurrency is the product of worker_processes and worker_connections # ie max_clients = worker_processes * worker_connections # When reverse proxy is set, max_clients = worker_processes * worker_connections / 4 why # Why should the above reverse proxy be divided by 4, it should be said to be an experience value # According to the above conditions, the maximum number of connections that Nginx Server can handle under normal circumstances is: 4 * 8000 = 32000 # The setting of worker_connections value is related to the size of physical memory # Because concurrency is bound by IO, the value of max_clients must be less than the maximum number of files that the system can open #…