Recall & Review
beginner
What is the role of
worker_processes in nginx?It sets the number of worker processes that nginx will start. Each worker handles client requests independently, improving performance by using multiple CPU cores.
Click to reveal answer
beginner
What does the
worker_connections directive control in nginx?It defines the maximum number of simultaneous connections each worker process can handle. This limits how many clients can be served at the same time per worker.
Click to reveal answer
intermediate
How do
worker_processes and worker_connections work together?The total maximum connections nginx can handle is roughly
worker_processes × worker_connections. More workers and connections mean nginx can serve more clients simultaneously.Click to reveal answer
intermediate
Why should
worker_processes usually match the number of CPU cores?Matching worker processes to CPU cores helps nginx use the server's hardware efficiently, avoiding too many processes competing for CPU time and improving request handling speed.
Click to reveal answer
beginner
What happens if
worker_connections is set too low?Nginx will limit the number of clients it can serve at once, causing some requests to wait or fail under high load, reducing server responsiveness.
Click to reveal answer
What does the
worker_processes directive specify in nginx?✗ Incorrect
worker_processes sets how many worker processes nginx will start to handle requests.
If you want nginx to handle more simultaneous clients, which directive should you increase?
✗ Incorrect
worker_connections controls how many connections each worker can handle at once.
What is a good rule of thumb for setting
worker_processes?✗ Incorrect
Setting worker_processes to the number of CPU cores helps use hardware efficiently.
How do you calculate the approximate max simultaneous connections nginx can handle?
✗ Incorrect
The total max connections is roughly worker_processes multiplied by worker_connections.
What might happen if
worker_connections is too low during high traffic?✗ Incorrect
Low worker_connections limits simultaneous clients, causing delays or failures.
Explain how
worker_processes and worker_connections affect nginx's ability to handle client requests.Think about how many clients nginx can serve at once.
You got /4 concepts.
Describe why matching
worker_processes to CPU cores is important in nginx configuration.Consider how CPU cores and processes work together.
You got /4 concepts.