Complete the code to set the number of worker processes to 4.
worker_processes [1];The worker_processes directive sets how many worker processes Nginx will use. Setting it to 4 means Nginx will run 4 worker processes.
Complete the code to set the maximum number of simultaneous connections per worker to 1024.
events {
worker_connections [1];
}The worker_connections directive inside the events block sets the maximum number of simultaneous connections each worker process can handle. Setting it to 1024 allows each worker to handle up to 1024 connections.
Fix the error in the configuration line to correctly set worker processes to automatically match CPU cores.
worker_processes [1];The correct keyword to automatically set worker processes to the number of CPU cores is auto. Other options are invalid and cause errors.
Fill both blanks to set worker processes to 2 and worker connections to 2048.
worker_processes [1]; events { worker_connections [2]; }
Setting worker_processes to 2 means Nginx will run 2 worker processes. Setting worker_connections to 2048 allows each worker to handle up to 2048 simultaneous connections.
Fill all three blanks to configure worker processes to auto, worker connections to 512, and set multi_accept to on.
worker_processes [1]; events { worker_connections [2]; multi_accept [3]; }
Setting worker_processes to auto lets Nginx detect CPU cores. worker_connections set to 512 limits connections per worker. multi_accept on allows a worker to accept multiple new connections at once, improving performance.