Please help me understand what worker_processes and worker_connections are in Nginx and what is the relation between them. I have looked under Nginx directives it says:
worker_processes
A worker process is a single-threaded process.
If Nginx is doing CPU-intensive work such as SSL or gzipping and you have 2 or more CPUs/cores, then you may set worker_processes to be equal to the number of CPUs or cores.
If you are serving a lot of static files and the total size of the files is bigger than the available memory, then you may increase worker_processes to fully utilize disk bandwidth.
worker_connections
The worker_connections and worker_processes from the main section allows you to calculate max clients you can handle:
max clients = worker_processes * worker_connections
So I understand that worker_processes is single threaded and its value is helpful in CPU-intensive work, but I am unable to understand "allows you to handle max clients you can handle".
If anyone can give an example as given in worker_processes it would be helpful for me to understand.