Challenge - 5 Problems
Backup Server Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Nginx Backup Server Fallback Behavior
Given the following nginx upstream configuration, what will happen when the primary server is down?
Nginx
upstream backend {
server primary.example.com max_fails=3 fail_timeout=30s;
server backup.example.com backup;
}
server {
location / {
proxy_pass http://backend;
}
}Attempts:
2 left
💡 Hint
Think about how the 'backup' keyword affects server selection in nginx upstream blocks.
✗ Incorrect
The 'backup' server is used only when all non-backup servers are considered down. Here, primary.example.com is the main server and backup.example.com is used only after primary fails 3 times within 30 seconds.
❓ Configuration
intermediate2:00remaining
Configuring Multiple Backup Servers in Nginx
Which nginx upstream configuration correctly sets up one primary server and two backup servers?
Attempts:
2 left
💡 Hint
Backup servers must be marked with the 'backup' keyword to be used only when primary fails.
✗ Incorrect
Only servers marked with 'backup' are used as backups. Option A correctly marks both backup1 and backup2 as backup servers.
❓ Troubleshoot
advanced2:00remaining
Troubleshooting Backup Server Not Used
You configured a backup server in nginx, but requests never go to it even when the primary server is down. What is the most likely cause?
Attempts:
2 left
💡 Hint
Consider how nginx decides a server is down and when it switches to backup.
✗ Incorrect
If 'max_fails' is set too high, nginx does not mark the primary server as down quickly, so it never switches to the backup server.
🔀 Workflow
advanced2:00remaining
Backup Server Failover Workflow
What is the correct sequence of events when nginx fails over from a primary to a backup server?
Attempts:
2 left
💡 Hint
Think about how nginx detects failure and switches servers step-by-step.
✗ Incorrect
Nginx first detects failure (1), marks server down (2), switches to backup (3), and keeps checking primary (4).
✅ Best Practice
expert3:00remaining
Best Practice for Backup Server Health Checks
Which configuration snippet best ensures nginx properly detects backup server health before sending traffic to it?
Attempts:
2 left
💡 Hint
Backup servers should have health check parameters to avoid sending traffic to unhealthy backups.
✗ Incorrect
Option B sets lower max_fails and fail_timeout for the backup server, allowing nginx to detect backup failures quickly before sending traffic.