Fundamentals 18 min read

Why Does TCP Retransmission Matter? Unveiling the Secrets Behind Reliable Data Transfer

In the digital age, TCP's retransmission mechanisms ensure reliable data delivery by handling packet loss through timeout, fast retransmission, SACK, and D‑SACK, while adaptive RTO calculations and optimization strategies keep network performance stable across varied conditions.

Deepin Linux
Deepin Linux
Deepin Linux
Why Does TCP Retransmission Matter? Unveiling the Secrets Behind Reliable Data Transfer

Part1: Network Transmission "Dark Reefs" – Packet Loss

Packet loss occurs due to network congestion, hardware failures, signal interference, configuration errors, or attacks such as DDoS. These losses damage data integrity, degrade application performance, and worsen user experience.

Network congestion: excessive traffic fills buffers, causing drops.

Hardware faults: router, switch, NIC failures, or damaged cables.

Signal interference: wireless noise, obstacles, or overlapping Wi‑Fi channels.

Configuration mistakes: wrong routing tables, subnet masks, VLANs.

Network attacks: DDoS floods consume bandwidth, leading to drops.

Part2: TCP Retransmission Mechanism Appears

TCP introduces retransmission to recover lost packets. Key techniques include timeout retransmission, fast retransmission, SACK, and D‑SACK.

2.1 Timeout Retransmission

Each packet gets a timer; if no ACK arrives before expiration, the packet is resent. The Retransmission Timeout (RTO) must be balanced: too large adds delay, too small causes unnecessary retransmissions and congestion.

TCP dynamically computes RTO using measured Round‑Trip Time (RTT) samples and their variance, applying the formula RTO = RTTs + 4·RTTD with α=0.125, β=0.25 (Linux defaults).

2.2 Fast Retransmission

When three duplicate ACKs for the same sequence number are received, TCP immediately retransmits the missing segment, avoiding the timer wait and improving recovery speed.

2.3 SACK and D‑SACK

SACK (Selective Acknowledgment) lets the receiver inform the sender about non‑contiguous blocks that arrived, enabling precise retransmission of only missing data. D‑SACK (Duplicate SACK) reports duplicate receptions, helping the sender distinguish between lost packets and lost ACKs.

Part3: Deep Dive into Retransmission Logic

TCP ensures reliability through ACKs, sequence numbers, checksums, and retransmission. If an ACK is missing, the sender resends the corresponding segment. Checksums detect corrupted data, prompting retransmission.

The Karn algorithm excludes retransmitted packets from RTT measurements to avoid ambiguity, improving RTO accuracy.

Additional optimizations adjust RTO based on congestion, employ advanced congestion‑control algorithms like BBR, and refine fast‑retransmission criteria.

Part4: Retransmission Mechanism in Practice and Optimization

In high‑bandwidth, low‑latency environments, retransmissions are rare and quickly resolved. In congested or unstable networks, frequent retransmissions can exacerbate latency and reduce throughput.

Optimization strategies include tuning TCP parameters (RTO, window size), adopting smarter congestion‑control algorithms (e.g., BBR), and improving network infrastructure (topology, QoS, high‑performance hardware).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPRTONetwork ReliabilityPacket LossretransmissionSACKKarn algorithm
Deepin Linux
Written by

Deepin Linux

Research areas: Windows & Linux platforms, C/C++ backend development, embedded systems and Linux kernel, etc.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.