O'Reilly logo

NGINX High Performance by Rahul Sharma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring NGINX workers

NGINX runs a fixed number of worker processes as per the specified configuration. As explained in Chapter 1, Working with NGINX, these worker processes are responsible for all request processing. In the following sections, we will work with NGINX worker parameters. These parameters are mostly part of the NGINX global context.

worker_processes

The worker_processes directive controls the number of workers:

worker_processes 1;

The default value for this is 1, which means that NGINX runs only one worker. The value should be changed to an optimal value depending on the number of cores available, disks, network subsystem, server load, and so on.

As a starting point, set the value to the number of cores available. Determine the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required