0
0
Nginxdevops~20 mins

Why tuning handles high traffic in Nginx - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
NGINX High Traffic Tuning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why is tuning worker_processes important in NGINX for high traffic?

NGINX uses worker_processes to handle connections. What happens if this value is set too low on a multi-core server?

ANGINX will automatically increase worker_processes to match CPU cores.
BNGINX will crash immediately due to resource exhaustion.
CNGINX will use more memory but handle requests faster.
DNGINX will not fully use all CPU cores, causing slower request handling.
Attempts:
2 left
💡 Hint

Think about how CPU cores and worker processes relate.

💻 Command Output
intermediate
1:00remaining
What is the output of checking active connections in NGINX?

After enabling the stub_status module, you run curl http://localhost/nginx_status. What output shows active connections?

Nginx
Active connections: 5 
server accepts handled requests
 100 100 200 
Reading: 1 Writing: 2 Waiting: 2
Aserver accepts handled requests
BReading: 1 Writing: 2 Waiting: 2
CActive connections: 5
D100 100 200
Attempts:
2 left
💡 Hint

Look for the line that directly states active connections.

Configuration
advanced
1:30remaining
Which NGINX configuration snippet correctly increases the maximum number of open file descriptors?

To handle high traffic, you want to increase the limit of open files NGINX can use. Which snippet correctly sets this in the nginx.conf?

Aworker_connections 65535;
Bworker_rlimit_nofile 65535;
Cmax_open_files 65535;
Dopen_files_limit 65535;
Attempts:
2 left
💡 Hint

Look for the directive that controls file descriptor limits.

Troubleshoot
advanced
1:30remaining
Why does NGINX return 'too many open files' error under high traffic?

NGINX logs show 'too many open files' errors during peak traffic. What is the most likely cause?

AThe <code>worker_rlimit_nofile</code> or system file descriptor limit is too low.
BNGINX worker_processes is set higher than CPU cores.
CThe <code>keepalive_timeout</code> is set too high.
DThe <code>client_max_body_size</code> is too small.
Attempts:
2 left
💡 Hint

Think about system limits on open files.

🔀 Workflow
expert
2:00remaining
Order the steps to tune NGINX for handling high traffic efficiently

Arrange these steps in the correct order to tune NGINX for high traffic:

A1,2,3,4
B3,1,2,4
C1,3,2,4
D2,1,3,4
Attempts:
2 left
💡 Hint

Think about setting base limits before increasing connections and applying changes last.