0
0
Nginxdevops~10 mins

Worker processes and connections in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the number of worker processes to 4.

Nginx
worker_processes [1];
Drag options to blanks, or click blank then click option'
Aauto
B8
C4
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'auto' instead of a number when a fixed number is required here.
2fill in blank
medium

Complete the code to set the maximum number of simultaneous connections per worker to 1024.

Nginx
events {
    worker_connections [1];
}
Drag options to blanks, or click blank then click option'
A512
B1024
C2048
D256
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a value too low that limits connections unnecessarily.
3fill in blank
hard

Fix the error in the configuration line to correctly set worker processes to automatically match CPU cores.

Nginx
worker_processes [1];
Drag options to blanks, or click blank then click option'
Aauto
Bautomatic
Ccpu
Dcores
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'automatic' or 'cpu' which are not valid keywords.
4fill in blank
hard

Fill both blanks to set worker processes to 2 and worker connections to 2048.

Nginx
worker_processes [1];
events {
    worker_connections [2];
}
Drag options to blanks, or click blank then click option'
A2
B1024
C2048
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the values for worker processes and worker connections.
5fill in blank
hard

Fill all three blanks to configure worker processes to auto, worker connections to 512, and set multi_accept to on.

Nginx
worker_processes [1];
events {
    worker_connections [2];
    multi_accept [3];
}
Drag options to blanks, or click blank then click option'
Aauto
B512
Con
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Setting multi_accept to 'off' when 'on' is needed for performance.