Course contentsShow
← Computer Science
Lesson 1480 of 2,87234. Internet Protocol SuiteFree lesson

TCP Congestion Control: Fast Retransmit and Fast Recovery

Using duplicate ACKs to quickly detect and recover from single packet loss without waiting for timeout.

TCP Congestion Control: Fast Retransmit and Fast Recovery

What you'll learn: How TCP uses duplicate acknowledgments to detect packet loss and recover quickly without waiting for a timeout.

The Problem with Timeouts

In earlier lessons, you learned that TCP retransmits lost packets when timers expire. But waiting for a timeout is slow—it can take seconds. If a single packet gets lost while others arrive successfully, we're wasting valuable time sitting idle when we could be recovering immediately.

Fast Retransmit: The Duplicate ACK Signal

When a receiver gets packets out of order (say, packets 1, 2, 4, 5, but 3 is missing), it repeatedly sends an ACK for the last in-order byte it received (ACK for packet 2). These duplicate ACKs are like urgent signals saying "I'm still waiting for packet 3!"

Fast Retransmit works this way: if the sender receives three duplicate ACKs for the same sequence number, it immediately assumes that packet is lost and retransmits it—without waiting for the timeout. Why three? Because occasional packet reordering might cause one or two duplicates, but three strongly suggests actual loss.

Fast Recovery: Avoiding Slow Start

Here's the clever part: if packets are arriving (even out of order), the network isn't completely congested. Instead of dropping back to Slow Start's cautious beginning, Fast Recovery cuts the congestion window in half and continues with Congestion Avoidance.

Think of it like driving: if you hit a pothole (single packet loss), you slow down but don't come to a complete stop—the road is mostly fine.

The algorithm: receive 3 duplicate ACKs → retransmit missing packet → cut cwnd by half → continue transmitting new data → resume normal operation when the gap is filled.

Key Takeaway: Fast Retransmit uses three duplicate ACKs to detect single packet loss instantly, while Fast Recovery avoids the performance penalty of restarting Slow Start, maintaining higher throughput during minor congestion events.