Complete the code to set the maximum number of failed attempts before marking a server as down.
server backend1.example.com max_fails=[1] fail_timeout=10s;
The max_fails directive sets how many failed attempts are allowed before the server is considered unavailable. Here, 3 is a common choice.
Complete the code to set the fail timeout period after max fails is reached.
server backend2.example.com max_fails=3 fail_timeout=[1];
The fail_timeout directive sets how long to consider the server down after max_fails is reached. 10 seconds is a typical value.
Fix the error in the server block to correctly set max_fails and fail_timeout.
server backend3.example.com max_fails=[1] fail_timeout=10s;
The max_fails value must be a positive integer. 'five' is invalid, 0 disables failure counting, and negative numbers are invalid.
Fill both blanks to set max_fails to 4 and fail_timeout to 20 seconds.
server backend4.example.com max_fails=[1] fail_timeout=[2];
max_fails is set to 4, and fail_timeout must include a time unit, here 20 seconds.
Fill all three blanks to configure max_fails as 2, fail_timeout as 15 seconds, and add a weight of 5.
server backend5.example.com max_fails=[1] fail_timeout=[2] weight=[3];
max_fails is 2, fail_timeout is 15 seconds with unit, and weight is set to 5 to influence load balancing.