Recall & Review
beginner
What does the
max_fails directive control in nginx?It sets the maximum number of failed attempts to connect to a server before nginx considers it unavailable.
Click to reveal answer
beginner
What is the purpose of the
fail_timeout directive in nginx?It defines the time period during which the server is considered unavailable after reaching the max_fails limit.
Click to reveal answer
intermediate
How do
max_fails and fail_timeout work together in nginx?If a server fails
max_fails times within fail_timeout, nginx stops sending requests to it for the duration of fail_timeout.Click to reveal answer
beginner
Example: What happens if
max_fails=3 and fail_timeout=30s?If a server fails 3 times within 30 seconds, nginx marks it as down and stops sending requests to it for 30 seconds.
Click to reveal answer
beginner
Where do you configure
max_fails and fail_timeout in nginx?Inside the
upstream block for load balancing servers.Click to reveal answer
What does
max_fails specify in nginx?✗ Incorrect
max_fails sets how many failed attempts to connect to a server are allowed before nginx stops sending requests to it.
What happens during the
fail_timeout period after max_fails is reached?✗ Incorrect
During fail_timeout, nginx treats the server as down and does not send requests to it.
Where do you set
max_fails and fail_timeout in nginx config?✗ Incorrect
These directives are set inside the upstream block where backend servers are defined.
If
max_fails is 5 and fail_timeout is 10s, what happens if 5 fails occur over 20 seconds?✗ Incorrect
Fails must happen within the fail_timeout period to mark the server down.
Why use
max_fails and fail_timeout in nginx?✗ Incorrect
They help nginx avoid sending requests to servers that are failing, improving reliability.
Explain how nginx uses
max_fails and fail_timeout to manage backend servers.Think about how nginx decides a server is temporarily unavailable.
You got /3 concepts.
Describe where and why you would configure
max_fails and fail_timeout in an nginx setup.Consider the role of upstream servers in nginx.
You got /3 concepts.