How many seconds does it take for a server to be considered "down", and how do I calculate it?
Short answer
A server is considered down (Error) once Required Failures checks fail in a row. On a server that does not respond, each check lasts as long as Timeout, and Period (at least 1 second in types other than Ping) is waited between checks; therefore the duration is limited to approximately Required Failures × (Period + Timeout). If the port is closed or the server immediately returns an erroneous response, the check fails without waiting for Timeout and the duration becomes shorter. For the decision to be reflected in traffic, at most 2.5 seconds is added in HTTP and L7 TCP vServices, and at most approximately 9 seconds in Network vService. With the defaults (Period 1 s, Timeout 1 s, Required Failures 2), a server that does not respond is removed from traffic in approximately 3–6 seconds in HTTP and L7 TCP vServices.
How Does It Work?
| Term | Meaning |
|---|---|
| P | Period; at least 1 second in types other than Ping |
| T | Duration of a failed check: Timeout if the server does not respond; almost 0 if the port is closed or an erroneous response is returned |
| RF | Required Failures |
| RS | Required Successes |
- Forming the decision: at most approximately RF × (P + T).
- Reflecting the decision in traffic:
- At most 2.5 seconds in HTTP and L7 TCP vServices.
- In Network vService (TCP - L4, UDP - L4; Port Range off), removing the server takes at most approximately 9 seconds, and taking it back takes at most 5 seconds.
- In Network vService, if ANY - L3 or Port Range is on, the health status is not reflected in distribution.
Details: Health status transitions, How many seconds does it take for a health check result to affect traffic?
Examples
For HTTP and L7 TCP vService (including the reflection time):
| Situation | Settings | Approximate duration |
|---|---|---|
| Server not responding, defaults | P=1, T=1, RF=2 | 3–6 s |
| Port closed or HTTP 500, defaults | P=1, RF=2 | 1–4 s |
| Slow service setting, server not responding | P=5, T=10, RF=3 | 40–48 s |
Recovery Time
The server becomes OK again after Required Successes consecutive successful checks and is taken into traffic: between approximately (RS − 1) × P and RS × P, plus at most 2.5 seconds in HTTP and L7 TCP vServices. With the defaults (RS=3), approximately 2–6 seconds.
In TR7
- Values: Load Balancer → Profiles → Health Checks → profile → Edit. If Period and Timeout are set to 120 seconds or more, 1 second is applied (What is the default health check behavior (Period, Timeout, Required Successes, Required Failures)?).
- Monitoring: State transitions are listed with their time in the Health Checks tab of the Backend Service; the check duration and the status chart are in the Health Check tab on the Dashboard.
Common Misconceptions
- "The duration is RF × Period." On a server that does not respond, each check also spends the Timeout.
- "A Period of 0.5 seconds halves the duration." In types other than Ping, at least 1 second is waited between two checks.
- "A newly assigned health check allows traffic immediately." The Backend Service starts in the Preparing status; it enters traffic after Required Successes consecutive successful checks.
How it is done in the documentation
