Process Flow - Max fails and fail timeout
Start request to backend
Request success?
Reset fail count
Fail count >= max_fails?
No→Continue sending requests
Yes
Mark backend as down
Wait fail_timeout seconds
Retry backend
If success, mark backend up and reset fail count
Repeat process
This flow shows how nginx tracks failed requests to a backend server, marks it down after max fails, waits fail_timeout seconds, then retries.