0
0
Nginxdevops~20 mins

Round-robin (default) in Nginx - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Round-robin Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:00remaining
What is the default load balancing method in NGINX?
NGINX uses a load balancing method to distribute client requests across multiple servers. What is the default method used if none is specified?
ARandom
BLeast connections
CRound-robin
DIP hash
Attempts:
2 left
💡 Hint
Think about the simplest way to distribute requests evenly without extra configuration.
Configuration
intermediate
1:30remaining
Identify the correct NGINX upstream block for round-robin load balancing
Which of the following NGINX upstream configurations correctly sets up round-robin load balancing for two backend servers?
A
upstream backend {
    server backend1.example.com;
    server backend2.example.com;
}
B
upstream backend {
    least_conn;
    server backend1.example.com;
    server backend2.example.com;
}
C
upstream backend {
    ip_hash;
    server backend1.example.com;
    server backend2.example.com;
}
D
upstream backend {
    random;
    server backend1.example.com;
    server backend2.example.com;
}
Attempts:
2 left
💡 Hint
Round-robin is the default and requires no extra directive inside the upstream block.
Troubleshoot
advanced
2:00remaining
Why might NGINX not distribute requests evenly in round-robin mode?
You configured NGINX with multiple backend servers using round-robin. However, one server receives significantly more requests than others. What could cause this behavior?
AOne backend server is slower and NGINX retries requests on it more often.
BRound-robin requires explicit configuration; without it, NGINX uses least connections.
CNGINX caches DNS and resolves backend IPs only once, causing uneven distribution if IPs change.
DClient connections are kept alive and reused, so requests stick to the same backend server.
Attempts:
2 left
💡 Hint
Think about how persistent connections affect request distribution.
Best Practice
advanced
1:30remaining
What is a recommended practice when using round-robin load balancing in NGINX?
When using round-robin load balancing in NGINX, which practice helps ensure better distribution and reliability?
AEnable health checks to remove unhealthy backend servers automatically.
BUse IP hash to guarantee the same client always hits the same server.
CDisable keepalive connections to force new connections for each request.
DConfigure random load balancing to avoid predictable server selection.
Attempts:
2 left
💡 Hint
Think about how to avoid sending requests to servers that are down.
🧠 Conceptual
expert
2:00remaining
How does NGINX implement round-robin load balancing internally?
Which statement best describes how NGINX distributes requests using round-robin load balancing by default?
ANGINX selects the backend server with the fewest active connections for each new request.
BNGINX cycles through the list of backend servers sequentially, sending each new request to the next server in order.
CNGINX hashes the client IP address to consistently route requests from the same client to the same server.
DNGINX randomly selects a backend server for each request to distribute load unpredictably.
Attempts:
2 left
💡 Hint
Round-robin means taking turns in a fixed order.