0
0
Nginxdevops~10 mins

Max fails and fail timeout in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the maximum number of failed attempts before marking a server as down.

Nginx
server backend1.example.com max_fails=[1] fail_timeout=10s;
Drag options to blanks, or click blank then click option'
A3
B5
C0
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Setting max_fails to 0 disables failure counting, which is not intended here.
Using a string like 'five' instead of a number.
2fill in blank
medium

Complete the code to set the fail timeout period after max fails is reached.

Nginx
server backend2.example.com max_fails=3 fail_timeout=[1];
Drag options to blanks, or click blank then click option'
A10s
B30s
C5s
D60s
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the time unit causes a syntax error.
Setting fail_timeout too low or too high without reason.
3fill in blank
hard

Fix the error in the server block to correctly set max_fails and fail_timeout.

Nginx
server backend3.example.com max_fails=[1] fail_timeout=10s;
Drag options to blanks, or click blank then click option'
A-1
B3
Cfive
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using words instead of numbers.
Using zero or negative numbers.
4fill in blank
hard

Fill both blanks to set max_fails to 4 and fail_timeout to 20 seconds.

Nginx
server backend4.example.com max_fails=[1] fail_timeout=[2];
Drag options to blanks, or click blank then click option'
A4
B10s
C20s
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number without a time unit for fail_timeout.
Setting max_fails to zero.
5fill in blank
hard

Fill all three blanks to configure max_fails as 2, fail_timeout as 15 seconds, and add a weight of 5.

Nginx
server backend5.example.com max_fails=[1] fail_timeout=[2] weight=[3];
Drag options to blanks, or click blank then click option'
A2
B15s
C5
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the time unit in fail_timeout.
Using invalid values for weight.