TCP retransmission resends packets that were lost or not acknowledged within a timeout period. Fast retransmit triggers after 3 duplicate ACKs (indicating a gap). Timeout-based retransmission (RTO) fires after a calculated delay. Excessive retransmissions indicate network congestion or path problems.
TCP guarantees reliable delivery through retransmission. When a sender does not receive an ACK within the Retransmission Timeout (RTO), it resends the segment. RTO is calculated from smoothed RTT measurements (Jacobson's algorithm, RFC 6298) – typically 200ms minimum. Fast retransmit does not wait for timeout: when the receiver gets an out-of-order segment, it immediately ACKs the last in-order byte. Three duplicate ACKs (same ack number repeated) tell the sender that one specific segment was likely lost, triggering immediate retransmission without waiting for RTO. SACK (Selective Acknowledgment) further optimizes by reporting exactly which segments were received, so the sender retransmits only truly missing data. Retransmission rates above 1-2% indicate serious network issues. Monitor with ss -ti (retrans field) or netstat -s (retransmit statistics).
Congestion
Network congestion occurs when traffic exceeds link or buffer capacity, causing packet loss and increased latency. TCP congestion control algorithms (Cubic, BBR, Reno) dynamically adjust sending rate to avoid overwhelming the network. Persistent congestion degrades all traffic on the shared path.
ACK (Acknowledgment)
ACK (acknowledgment) is a TCP flag confirming receipt of data. The ACK number indicates the next byte the receiver expects. Delayed ACKs batch confirmations for efficiency (typically every 2 segments or 200ms). Missing ACKs trigger retransmission – the sender assumes data was lost.
Packet Loss
Packet loss occurs when transmitted packets fail to reach their destination. Causes include congestion (buffer overflow), CRC errors (physical layer noise), and intentional drops (QoS policing, firewall rules). TCP retransmits lost packets automatically. UDP does not – the application must handle loss.