Skip to content
ENExplore Calculators

Connection Timeout Calculator

Derive the RFC 6298 retransmission timeout and the total time TCP spends retrying before it gives up.

About Connection Timeout Calculator

RFC 6298 sets the retransmission timeout from the smoothed RTT plus four times its variance, then doubles it after every failed attempt. Summing that geometric series gives the wall-clock time before the stack reports the connection dead. This number is your worst-case failure detection time: it decides how long a client hangs on a dead server, so it has to be shorter than the health check and failover budget above it.

Formula

Connection Timeout

RTO = max(floor, SRTT + 4 × RTTVAR), and the backoff sum is RTO × (2^retries − 1).

SRTT
Smoothed round-trip time estimate
RTTVAR
Round-trip time variation
floor
Minimum RTO the stack enforces (1 s in the RFC, 200 ms on Linux)

Worked example

With the default values below, Connection Timeout Calculator returns Total Time Before Giving Up of 6.20. Change any input above and every figure here is recalculated in your browser.

Inputs used

Smoothed round-trip time (SRTT)minimum 0.1 ms
40 ms
RTT variance (RTTVAR)minimum 0 ms
10 ms
Retransmission attemptsaccepts 1–12 attempts
5 attempts
Minimum RTO floorminimum 0 ms
200 ms

Results

Total Time Before Giving Up
6.20 s
Initial RTO
200 ms
Final Retry Interval
3,200 ms
Total Timeout
6,200 ms
Failure Detection Budget
6.24 s

Step by step

  1. 1Values used
  2. 2Connection Timeout
  3. 3Total Time Before Giving Up= 6.20 s
  4. 4Initial RTO= 200 ms
  5. 5Final Retry Interval= 3,200 ms
  6. 6Total Timeout= 6,200 ms
  7. 7Failure Detection Budget= 6.24 s

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is Connection Timeout calculated?

RTO = max(floor, SRTT + 4 × RTTVAR), and the backoff sum is RTO × (2^retries − 1). RFC 6298 sets the retransmission timeout from the smoothed RTT plus four times its variance, then doubles it after every failed attempt. Summing that geometric series gives the wall-clock time before the stack reports the connection dead.

Why does Connection Timeout matter?

This number is your worst-case failure detection time: it decides how long a client hangs on a dead server, so it has to be shorter than the health check and failover budget above it.

What values do I need to enter?

This calculator takes 4 inputs: Smoothed round-trip time (SRTT), RTT variance (RTTVAR), Retransmission attempts, Minimum RTO floor. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why is the RTO floor so much larger than the RTT?

The floor guards against a spuriously low RTT estimate causing needless retransmissions. In datacentre networks with sub-millisecond RTTs the floor dominates completely, which is why incast recovery is often measured in hundreds of milliseconds.

Connection Timeout Calculator | Calcrivo