Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Fast Recovery Technique For Loss Recovery in TCP
Next article icon

Fast Recovery Technique For Loss Recovery in TCP

Last Updated : 02 Mar, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

When the RTO timer expires but an ACK is not received, the sender confirms that the packet is lost due to congestion at intermediary devices. Now sender has to tackle this congestion state carefully. Fast Recovery is the packet loss recovery technique. Recovery means becoming inactive and not transmitting any new packet for some time.

When there is a packet loss detected, the TCP sender does 4 things:

  1. Reduces the cwnd by 50%.
  2. Reduces the ssthresh value by 50% of cwnd.
  3. Retransmit the lost packet.
  4. Enters the Fast Recovery phase.

Fast Recovery Phase:

This comprises of two parts: 

  1. The half window of silence
  2. Maintain the inflight=cwnd until a new ACK arrives at the sender side.

The half window of silence is the amount of time the sender becomes silent(inactive) and waits for inflight to become equal to cwnd. Because cwnd is reduced to its half when packet loss is detected. Before that inflight was exactly equal to cwnd, but now inflight is approximately double of cwnd value. So, the sender doesn't transmit any new packet neither it increases its cwnd by 1 per ACK. The sender will keep on getting DUP-ACK until the receiver receives the retransmitted packet. 

After the inflight becomes equal to cwnd, the half window of silence ends here, now also DUP-ACK will keep coming, so the sender doesn't increase its cwnd but it will maintain an inflight value equal to cwnd. When one DUP-ACK comes, the inflight becomes 1 less than the previous value, so to maintain inflight=cwnd sender transmits one new packet into the network. When finally the receiver gets the retransmitted packet and it sends a new ACK to the sender, then the sender will come out of the Fast Recovery phase and immediately enter the AIMD phase. The sender comes out of the recovery phase because it has confirmed that the lost packet is received by the receiver and thus the network is no longer congested. But, it has to carefully increase the cwnd to avoid subsequent congestion too early, thus entering AIMD hereafter.

Fast Recovery Technique:

Fast Recovery technique used in TCP Reno and TCPNewreno:

It faces a problem called "Half window of silence". It leads to the under-utilization of the available network resources. Because while the sender is silent the network bandwidth is wasted. Another problem is that it stalls the application, leading to frustration for the end-user. If the sender is not sending the data then the receiver will have to wait, this results in delay in data and a bad user experience. So, What is the solution?

One solution is to improve the estimation of ‘inflight’ data by using SACK (knowledge of gaps in receiver buffer). If the sender knows the updated 'inflight' value then the half window of silence will be over soon. Another solution is the Rate halving technique (previously, default in Linux). One more advanced solution is Proportional Rate Reduction (current default in Linux and defined in RFC 6937). 

Fast Recovery without SACK:

Fast Recovery without SACK
Fast Recovery without SACK
Before Fast Recovery:  cwnd = 10, inflight = 10    Initial stage when Fast Recovery begins:  cwnd = 5, ssthresh = 5, inflight = pipe = 10

The half window of silence until the pipe becomes equal to cwnd.

  1. DUP-ACK arrives at the sender: pipe=10-1=9
  2. DUP-ACK arrives at the sender: pipe=9-1=8
  3. DUP-ACK arrives at the sender: pipe=8-1=7
  4. DUP-ACK arrives at the sender: pipe=7-1=6
  5. DUP-ACK arrives at the sender: pipe=6-1=5. Now, cwnd=pipe, silence breaks now.
  6. DUP-ACK arrives at the sender: pipe=5-1=4, pipe<cwnd, the sender transmits a new packet, pipe=4+1=5
  7. DUP-ACK arrives at the sender: pipe=5-1=4, pipe<cwnd, the sender transmits a new packet, pipe=4+1=5

This continues, till retransmitted packet is ACKed by the receiver.

Fast Recovery with SACK:

It suffers from burst transmissions. When the network is losing the packets, the sender is sending a bunch of packets simultaneously which affects the network badly.

Fast Recovery with SACK
Fast Recovery with SACK

Initial state:

pipe = 5 segments  cwnd= 5 segments  ssthresh = 5 segments

This is the case when half the window of silence is over and pipe=cwnd.

DUP-ACK arrives with SACK blocks, SACK block tells that 3 packets are lost.

pip= 5-1-3= 1  pipe < cwnd 

New packets need to be transmitted = cwnd-pipe

Now, the sender will send 4 new packets. This is called burst transmission.


Next Article
Fast Recovery Technique For Loss Recovery in TCP

P

pintusaini
Improve
Article Tags :
  • Computer Subject
  • Computer Networks
  • Geeks Premier League
  • Geeks-Premier-League-2022

Similar Reads

    Rate Halving Technique For Loss Recovery in TCP
    Rate Halving is the packet loss recovery algorithm that overcomes the issue of the Fast Recovery algorithm. Rate Halving means that it will half the rate of packet transmission such that the receiver's application is not stalling. It avoids the half window of silence which would otherwise frustrate
    4 min read
    Crash Recovery in Transport Layer
    A key concept in the transport layer of an organizational convention, which is responsible for ensuring the reliable transfer of information between two endpoints, is crash recovery. Information loss or tampering may result from an organization failure or crash that occurs during the transmission of
    9 min read
    Proportional Rate Reduction - TCP Loss Recovery Algorithm
    TCP CUBIC is becoming the default in Linux Kernel and the Rate Halving technique for congestion avoidance was becoming the default in Linux Kernel. So, there was a mismatch between these two. Because Rate Halving was good for TCP Reno, Tahoe, and NewReno. It is good for those TCPs only which reduce
    9 min read
    Techniques for achieving good Quality of Service (QoS)
    Quality of Service (QoS) in networks : A stream of packets from a source to destination is called a flow. Quality of Service is defined as something a flow seeks to attain. In connection oriented network, all the packets belonging to a flow follow the same order. In a connectionless network, all the
    2 min read
    Congestion Control techniques in Computer Networks
    Congestion control refers to the techniques used to control or prevent congestion. Congestion control techniques can be broadly classified into two categories: Open Loop Congestion ControlOpen loop congestion control policies are applied to prevent congestion before it happens. The congestion contro
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences