Recall & Review
beginner
What is a backup server in the context of nginx?
A backup server is a secondary server that nginx uses only if the primary server is unavailable or fails. It helps keep the website or service running smoothly.
Click to reveal answer
beginner
How do you define a backup server in an nginx upstream block?
You add the keyword
backup after the server address inside the upstream block. For example: <br>upstream backend {
server primary.example.com;
server backup.example.com backup;
}Click to reveal answer
intermediate
Why use a backup server instead of just multiple primary servers?
A backup server is only used when all primary servers fail. This saves resources and avoids unnecessary load on the backup. It acts like a safety net.
Click to reveal answer
intermediate
What happens if the primary server recovers after the backup server starts handling requests?
nginx automatically switches back to the primary server once it is healthy again, stopping requests to the backup server.
Click to reveal answer
beginner
Write a simple nginx upstream block with one primary and one backup server.
upstream backend {
server primary.example.com;
server backup.example.com backup;
}Click to reveal answer
In nginx, what keyword marks a server as a backup in an upstream block?
✗ Incorrect
The keyword
backup is used to mark a server as a backup in nginx upstream configuration.When does nginx send traffic to a backup server?
✗ Incorrect
nginx uses the backup server only if all primary servers are unavailable.
What happens if the primary server comes back online after nginx switched to the backup?
✗ Incorrect
nginx automatically switches back to the primary server once it is healthy again.
Which of these is NOT a benefit of using a backup server in nginx?
✗ Incorrect
Backup servers are idle during normal operation, so they do not reduce load on primary servers.
How do you test if your nginx backup server configuration works?
✗ Incorrect
Stopping the primary server simulates failure and tests if nginx routes traffic to the backup server.
Explain how nginx uses backup servers in load balancing and why they are important.
Think about what happens when the main server is down.
You got /4 concepts.
Describe how to configure a backup server in nginx and how nginx switches between primary and backup servers.
Focus on the nginx configuration syntax and behavior.
You got /4 concepts.