| draft-ietf-quic-recovery-08.txt | draft-ietf-quic-recovery-09.txt | |||
|---|---|---|---|---|
| QUIC J. Iyengar, Ed. | QUIC J. Iyengar, Ed. | |||
| Internet-Draft I. Swett, Ed. | Internet-Draft I. Swett, Ed. | |||
| Intended status: Standards Track Google | Intended status: Standards Track Google | |||
| Expires: June 8, 2018 December 5, 2017 | Expires: August 1, 2018 January 28, 2018 | |||
| QUIC Loss Detection and Congestion Control | QUIC Loss Detection and Congestion Control | |||
| draft-ietf-quic-recovery-08 | draft-ietf-quic-recovery-09 | |||
| Abstract | Abstract | |||
| This document describes loss detection and congestion control | This document describes loss detection and congestion control | |||
| mechanisms for QUIC. | mechanisms for QUIC. | |||
| Note to Readers | Note to Readers | |||
| Discussion of this draft takes place on the QUIC working group | Discussion of this draft takes place on the QUIC working group | |||
| mailing list (quic@ietf.org), which is archived at | mailing list (quic@ietf.org), which is archived at | |||
| skipping to change at page 1, line 41 ¶ | skipping to change at page 1, line 41 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on June 8, 2018. | This Internet-Draft will expire on August 1, 2018. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2017 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| skipping to change at page 2, line 48 ¶ | skipping to change at page 2, line 48 ¶ | |||
| 3.4.7. Setting the Loss Detection Alarm . . . . . . . . . . 16 | 3.4.7. Setting the Loss Detection Alarm . . . . . . . . . . 16 | |||
| 3.4.8. On Alarm Firing . . . . . . . . . . . . . . . . . . . 17 | 3.4.8. On Alarm Firing . . . . . . . . . . . . . . . . . . . 17 | |||
| 3.4.9. Detecting Lost Packets . . . . . . . . . . . . . . . 18 | 3.4.9. Detecting Lost Packets . . . . . . . . . . . . . . . 18 | |||
| 3.5. Discussion . . . . . . . . . . . . . . . . . . . . . . . 19 | 3.5. Discussion . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 4. Congestion Control . . . . . . . . . . . . . . . . . . . . . 19 | 4. Congestion Control . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 4.1. Slow Start . . . . . . . . . . . . . . . . . . . . . . . 20 | 4.1. Slow Start . . . . . . . . . . . . . . . . . . . . . . . 20 | |||
| 4.2. Congestion Avoidance . . . . . . . . . . . . . . . . . . 20 | 4.2. Congestion Avoidance . . . . . . . . . . . . . . . . . . 20 | |||
| 4.3. Recovery Period . . . . . . . . . . . . . . . . . . . . . 20 | 4.3. Recovery Period . . . . . . . . . . . . . . . . . . . . . 20 | |||
| 4.4. Tail Loss Probe . . . . . . . . . . . . . . . . . . . . . 20 | 4.4. Tail Loss Probe . . . . . . . . . . . . . . . . . . . . . 20 | |||
| 4.5. Retransmission Timeout . . . . . . . . . . . . . . . . . 20 | 4.5. Retransmission Timeout . . . . . . . . . . . . . . . . . 20 | |||
| 4.6. Pacing Rate . . . . . . . . . . . . . . . . . . . . . . . 21 | 4.6. Pacing . . . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
| 4.7. Pseudocode . . . . . . . . . . . . . . . . . . . . . . . 21 | 4.7. Pseudocode . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
| 4.7.1. Constants of interest . . . . . . . . . . . . . . . . 21 | 4.7.1. Constants of interest . . . . . . . . . . . . . . . . 21 | |||
| 4.7.2. Variables of interest . . . . . . . . . . . . . . . . 21 | 4.7.2. Variables of interest . . . . . . . . . . . . . . . . 21 | |||
| 4.7.3. Initialization . . . . . . . . . . . . . . . . . . . 22 | 4.7.3. Initialization . . . . . . . . . . . . . . . . . . . 22 | |||
| 4.7.4. On Packet Sent . . . . . . . . . . . . . . . . . . . 22 | 4.7.4. On Packet Sent . . . . . . . . . . . . . . . . . . . 22 | |||
| 4.7.5. On Packet Acknowledgement . . . . . . . . . . . . . . 22 | 4.7.5. On Packet Acknowledgement . . . . . . . . . . . . . . 22 | |||
| 4.7.6. On Packets Lost . . . . . . . . . . . . . . . . . . . 23 | 4.7.6. On Packets Lost . . . . . . . . . . . . . . . . . . . 23 | |||
| 4.7.7. On Retransmission Timeout Verified . . . . . . . . . 23 | 4.7.7. On Retransmission Timeout Verified . . . . . . . . . 23 | |||
| 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 | 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 | |||
| 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 | 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 | |||
| 6.1. Normative References . . . . . . . . . . . . . . . . . . 23 | 6.1. Normative References . . . . . . . . . . . . . . . . . . 23 | |||
| 6.2. Informative References . . . . . . . . . . . . . . . . . 24 | 6.2. Informative References . . . . . . . . . . . . . . . . . 24 | |||
| 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 25 | 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
| Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 25 | Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 25 | |||
| Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 25 | Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 25 | |||
| B.1. Since draft-ietf-quic-recovery-06 . . . . . . . . . . . . 25 | B.1. Since draft-ietf-quic-recovery-08 . . . . . . . . . . . . 25 | |||
| B.2. Since draft-ietf-quic-recovery-05 . . . . . . . . . . . . 25 | B.2. Since draft-ietf-quic-recovery-07 . . . . . . . . . . . . 25 | |||
| B.3. Since draft-ietf-quic-recovery-04 . . . . . . . . . . . . 25 | B.3. Since draft-ietf-quic-recovery-06 . . . . . . . . . . . . 25 | |||
| B.4. Since draft-ietf-quic-recovery-03 . . . . . . . . . . . . 25 | B.4. Since draft-ietf-quic-recovery-05 . . . . . . . . . . . . 25 | |||
| B.5. Since draft-ietf-quic-recovery-02 . . . . . . . . . . . . 25 | B.5. Since draft-ietf-quic-recovery-04 . . . . . . . . . . . . 25 | |||
| B.6. Since draft-ietf-quic-recovery-01 . . . . . . . . . . . . 26 | B.6. Since draft-ietf-quic-recovery-03 . . . . . . . . . . . . 26 | |||
| B.7. Since draft-ietf-quic-recovery-00 . . . . . . . . . . . . 26 | B.7. Since draft-ietf-quic-recovery-02 . . . . . . . . . . . . 26 | |||
| B.8. Since draft-iyengar-quic-loss-recovery-01 . . . . . . . . 26 | B.8. Since draft-ietf-quic-recovery-01 . . . . . . . . . . . . 26 | |||
| B.9. Since draft-ietf-quic-recovery-00 . . . . . . . . . . . . 26 | ||||
| B.10. Since draft-iyengar-quic-loss-recovery-01 . . . . . . . . 26 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 1. Introduction | 1. Introduction | |||
| QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | QUIC is a new multiplexed and secure transport atop UDP. QUIC builds | |||
| on decades of transport and security experience, and implements | on decades of transport and security experience, and implements | |||
| mechanisms that make it attractive as a modern general-purpose | mechanisms that make it attractive as a modern general-purpose | |||
| transport. The QUIC protocol is described in [QUIC-TRANSPORT]. | transport. The QUIC protocol is described in [QUIC-TRANSPORT]. | |||
| QUIC implements the spirit of known TCP loss recovery mechanisms, | QUIC implements the spirit of known TCP loss recovery mechanisms, | |||
| skipping to change at page 15, line 5 ¶ | skipping to change at page 15, line 5 ¶ | |||
| OnPacketSentCC(sent_bytes) | OnPacketSentCC(sent_bytes) | |||
| sent_packets[packet_number].bytes = sent_bytes | sent_packets[packet_number].bytes = sent_bytes | |||
| SetLossDetectionAlarm() | SetLossDetectionAlarm() | |||
| 3.4.5. On Ack Receipt | 3.4.5. On Ack Receipt | |||
| When an ack is received, it may acknowledge 0 or more packets. | When an ack is received, it may acknowledge 0 or more packets. | |||
| Pseudocode for OnAckReceived and UpdateRtt follow: | Pseudocode for OnAckReceived and UpdateRtt follow: | |||
| OnAckReceived(ack): | OnAckReceived(ack): | |||
| largest_acked_packet = ack.largest_acked | largest_acked_packet = ack.largest_acked | |||
| // If the largest acked is newly acked, update the RTT. | // If the largest acked is newly acked, update the RTT. | |||
| if (sent_packets[ack.largest_acked]): | if (sent_packets[ack.largest_acked]): | |||
| latest_rtt = now - sent_packets[ack.largest_acked].time | latest_rtt = now - sent_packets[ack.largest_acked].time | |||
| UpdateRtt(latest_rtt, ack.ack_delay) | UpdateRtt(latest_rtt, ack.ack_delay) | |||
| // Find all newly acked packets. | // Find all newly acked packets. | |||
| for acked_packet in DetermineNewlyAckedPackets(): | for acked_packet in DetermineNewlyAckedPackets(): | |||
| OnPacketAcked(acked_packet.packet_number) | OnPacketAcked(acked_packet.packet_number) | |||
| DetectLostPackets(ack.largest_acked_packet) | DetectLostPackets(ack.largest_acked_packet) | |||
| SetLossDetectionAlarm() | SetLossDetectionAlarm() | |||
| UpdateRtt(latest_rtt, ack_delay): | UpdateRtt(latest_rtt, ack_delay): | |||
| // min_rtt ignores ack delay. | // min_rtt ignores ack delay. | |||
| min_rtt = min(min_rtt, latest_rtt) | min_rtt = min(min_rtt, latest_rtt) | |||
| // Adjust for ack delay if it's plausible. | // Adjust for ack delay if it's plausible. | |||
| if (latest_rtt - min_rtt > ack_delay): | if (latest_rtt - min_rtt > ack_delay): | |||
| latest_rtt -= ack_delay | latest_rtt -= ack_delay | |||
| // Only save into max ack delay if it's used | // Only save into max ack delay if it's used | |||
| // for rtt calculation and is not ack only. | // for rtt calculation and is not ack only. | |||
| if (!sent_packets[ack.largest_acked].ack_only) | if (!sent_packets[ack.largest_acked].ack_only) | |||
| max_ack_delay = max(max_ack_delay, ack_delay) | max_ack_delay = max(max_ack_delay, ack_delay) | |||
| // Based on {{RFC6298}}. | // Based on {{RFC6298}}. | |||
| if (smoothed_rtt == 0): | if (smoothed_rtt == 0): | |||
| smoothed_rtt = latest_rtt | smoothed_rtt = latest_rtt | |||
| rttvar = latest_rtt / 2 | rttvar = latest_rtt / 2 | |||
| else: | else: | |||
| rttvar = 3/4 * rttvar + 1/4 * abs(smoothed_rtt - latest_rtt) | rttvar_sample = abs(smoothed_rtt - latest_rtt) | |||
| smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * latest_rtt | rttvar = 3/4 * rttvar + 1/4 * rttvar_sample | |||
| smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * latest_rtt | ||||
| 3.4.6. On Packet Acknowledgment | 3.4.6. On Packet Acknowledgment | |||
| When a packet is acked for the first time, the following | When a packet is acked for the first time, the following | |||
| OnPacketAcked function is called. Note that a single ACK frame may | OnPacketAcked function is called. Note that a single ACK frame may | |||
| newly acknowledge several packets. OnPacketAcked must be called once | newly acknowledge several packets. OnPacketAcked must be called once | |||
| for each of these newly acked packets. | for each of these newly acked packets. | |||
| OnPacketAcked takes one parameter, acked_packet, which is the packet | OnPacketAcked takes one parameter, acked_packet_number, which is the | |||
| number of the newly acked packet, and returns a list of packet | packet number of the newly acked packet, and returns a list of packet | |||
| numbers that are detected as lost. | numbers that are detected as lost. | |||
| If this is the first acknowledgement following RTO, check if the | If this is the first acknowledgement following RTO, check if the | |||
| smallest newly acknowledged packet is one sent by the RTO, and if so, | smallest newly acknowledged packet is one sent by the RTO, and if so, | |||
| inform congestion control of a verified RTO, similar to F-RTO | inform congestion control of a verified RTO, similar to F-RTO | |||
| [RFC5682] | [RFC5682] | |||
| Pseudocode for OnPacketAcked follows: | Pseudocode for OnPacketAcked follows: | |||
| OnPacketAcked(acked_packet_number): | OnPacketAcked(acked_packet_number): | |||
| OnPacketAckedCC(acked_packet_number) | OnPacketAckedCC(acked_packet_number) | |||
| skipping to change at page 16, line 49 ¶ | skipping to change at page 16, line 49 ¶ | |||
| 3.4.7.2. Tail Loss Probe and Retransmission Alarm | 3.4.7.2. Tail Loss Probe and Retransmission Alarm | |||
| Tail loss probes [LOSS-PROBE] and retransmission timeouts [RFC6298] | Tail loss probes [LOSS-PROBE] and retransmission timeouts [RFC6298] | |||
| are an alarm based mechanism to recover from cases when there are | are an alarm based mechanism to recover from cases when there are | |||
| outstanding retransmittable packets, but an acknowledgement has not | outstanding retransmittable packets, but an acknowledgement has not | |||
| been received in a timely manner. | been received in a timely manner. | |||
| The TLP and RTO timers are armed when there is not unacknowledged | The TLP and RTO timers are armed when there is not unacknowledged | |||
| handshake data. The TLP alarm is set until the max number of TLP | handshake data. The TLP alarm is set until the max number of TLP | |||
| packets have been sent, and then the RTO tiemr is set. | packets have been sent, and then the RTO timer is set. | |||
| 3.4.7.3. Early Retransmit Alarm | 3.4.7.3. Early Retransmit Alarm | |||
| Early retransmit [RFC5827] is implemented with a 1/4 RTT timer. It | Early retransmit [RFC5827] is implemented with a 1/4 RTT timer. It | |||
| is part of QUIC's time based loss detection, but is always enabled, | is part of QUIC's time based loss detection, but is always enabled, | |||
| even when only packet reordering loss detection is enabled. | even when only packet reordering loss detection is enabled. | |||
| 3.4.7.4. Pseudocode | 3.4.7.4. Pseudocode | |||
| Pseudocode for SetLossDetectionAlarm follows: | Pseudocode for SetLossDetectionAlarm follows: | |||
| skipping to change at page 19, line 5 ¶ | skipping to change at page 19, line 5 ¶ | |||
| handshake packets when an ack is processed is identical to other | handshake packets when an ack is processed is identical to other | |||
| packets. | packets. | |||
| 3.4.9.2. Pseudocode | 3.4.9.2. Pseudocode | |||
| DetectLostPackets takes one parameter, acked, which is the largest | DetectLostPackets takes one parameter, acked, which is the largest | |||
| acked packet. | acked packet. | |||
| Pseudocode for DetectLostPackets follows: | Pseudocode for DetectLostPackets follows: | |||
| DetectLostPackets(largest_acked): | DetectLostPackets(largest_acked): | |||
| loss_time = 0 | loss_time = 0 | |||
| lost_packets = {} | lost_packets = {} | |||
| delay_until_lost = infinite | delay_until_lost = infinite | |||
| if (kUsingTimeLossDetection): | if (kUsingTimeLossDetection): | |||
| delay_until_lost = | delay_until_lost = | |||
| (1 + time_reordering_fraction) * max(latest_rtt, smoothed_rtt) | (1 + time_reordering_fraction) * | |||
| else if (largest_acked.packet_number == largest_sent_packet): | max(latest_rtt, smoothed_rtt) | |||
| // Early retransmit alarm. | else if (largest_acked.packet_number == largest_sent_packet): | |||
| delay_until_lost = 5/4 * max(latest_rtt, smoothed_rtt) | // Early retransmit alarm. | |||
| foreach (unacked < largest_acked.packet_number): | delay_until_lost = 5/4 * max(latest_rtt, smoothed_rtt) | |||
| time_since_sent = now() - unacked.time_sent | foreach (unacked < largest_acked.packet_number): | |||
| delta = largest_acked.packet_number - unacked.packet_number | time_since_sent = now() - unacked.time_sent | |||
| if (time_since_sent > delay_until_lost): | delta = largest_acked.packet_number - unacked.packet_number | |||
| lost_packets.insert(unacked) | if (time_since_sent > delay_until_lost): | |||
| else if (delta > reordering_threshold) | lost_packets.insert(unacked) | |||
| lost_packets.insert(unacked) | else if (delta > reordering_threshold) | |||
| else if (loss_time == 0 && delay_until_lost != infinite): | lost_packets.insert(unacked) | |||
| loss_time = now() + delay_until_lost - time_since_sent | else if (loss_time == 0 && delay_until_lost != infinite): | |||
| loss_time = now() + delay_until_lost - time_since_sent | ||||
| // Inform the congestion controller of lost packets and | // Inform the congestion controller of lost packets and | |||
| // lets it decide whether to retransmit immediately. | // lets it decide whether to retransmit immediately. | |||
| if (!lost_packets.empty()) | if (!lost_packets.empty()) | |||
| OnPacketsLost(lost_packets) | OnPacketsLost(lost_packets) | |||
| foreach (packet in lost_packets) | foreach (packet in lost_packets) | |||
| sent_packets.remove(packet.packet_number) | sent_packets.remove(packet.packet_number) | |||
| 3.5. Discussion | 3.5. Discussion | |||
| The majority of constants were derived from best common practices | The majority of constants were derived from best common practices | |||
| among widely deployed TCP implementations on the internet. | among widely deployed TCP implementations on the internet. | |||
| Exceptions follow. | Exceptions follow. | |||
| A shorter delayed ack time of 25ms was chosen because longer delayed | A shorter delayed ack time of 25ms was chosen because longer delayed | |||
| acks can delay loss recovery and for the small number of connections | acks can delay loss recovery and for the small number of connections | |||
| where less than packet per 25ms is delivered, acking every packet is | where less than packet per 25ms is delivered, acking every packet is | |||
| beneficial to congestion control and loss recovery. | beneficial to congestion control and loss recovery. | |||
| The default initial RTT of 100ms was chosen because it is slightly | The default initial RTT of 100ms was chosen because it is slightly | |||
| higher than both the median and mean min_rtt typically observed on | higher than both the median and mean min_rtt typically observed on | |||
| the public internet. | the public internet. | |||
| 4. Congestion Control | 4. Congestion Control | |||
| QUIC's congestion control is based on TCP NewReno[RFC6582] congestion | QUIC's congestion control is based on TCP NewReno [RFC6582] | |||
| control to determine the congestion window and pacing rate. QUIC | congestion control to determine the congestion window. QUIC | |||
| congestion control is specified in bytes due to finer control and the | congestion control is specified in bytes due to finer control and the | |||
| ease of appropriate byte counting[RFC3465]. | ease of appropriate byte counting [RFC3465]. | |||
| 4.1. Slow Start | 4.1. Slow Start | |||
| QUIC begins every connection in slow start and exits slow start upon | QUIC begins every connection in slow start and exits slow start upon | |||
| loss. QUIC re-enters slow start anytime the congestion window is | loss. QUIC re-enters slow start anytime the congestion window is | |||
| less than sshthresh, which typically only occurs after an RTO. While | less than sshthresh, which typically only occurs after an RTO. While | |||
| in slow start, QUIC increases the congestion window by the number of | in slow start, QUIC increases the congestion window by the number of | |||
| acknowledged bytes when each ack is processed. | acknowledged bytes when each ack is processed. | |||
| 4.2. Congestion Avoidance | 4.2. Congestion Avoidance | |||
| skipping to change at page 20, line 41 ¶ | skipping to change at page 20, line 43 ¶ | |||
| During recovery, the congestion window is not increased or decreased. | During recovery, the congestion window is not increased or decreased. | |||
| As such, multiple lost packets only decrease the congestion window | As such, multiple lost packets only decrease the congestion window | |||
| once as long as they're lost before exiting recovery. This causes | once as long as they're lost before exiting recovery. This causes | |||
| QUIC to decrease the congestion window multiple times if | QUIC to decrease the congestion window multiple times if | |||
| retransmisions are lost, but limits the reduction to once per round | retransmisions are lost, but limits the reduction to once per round | |||
| trip. | trip. | |||
| 4.4. Tail Loss Probe | 4.4. Tail Loss Probe | |||
| If recovery sends a tail loss probe, no change is made to the | If recovery sends a tail loss probe, no change is made to the | |||
| congestion window or pacing rate. Acknowledgement or loss of tail | congestion window. Acknowledgement or loss of tail loss probes are | |||
| loss probes are treated like any other packet. | treated like any other packet. | |||
| 4.5. Retransmission Timeout | 4.5. Retransmission Timeout | |||
| When retransmissions are sent due to a retransmission timeout alarm, | When retransmissions are sent due to a retransmission timeout alarm, | |||
| no change is made to the congestion window or pacing rate until the | no change is made to the congestion window until the next | |||
| next acknowledgement arrives. When an ack arrives, if packets prior | acknowledgement arrives. The retransmission timeout is considered | |||
| to the first retransmission timeout are acknowledged, then the | spurious when this acknowledgement acknowledges packets sent prior to | |||
| congestion window remains the same. If no packets prior to the first | the first retransmission timeout. The retransmission timeout is | |||
| retransmission timeout are acknowledged, the retransmission timeout | considered valid when this acknowledgement acknowledges no packets | |||
| has been validated and the congestion window must be reduced to the | sent prior to the first retransmission timeout. In this case, the | |||
| minimum congestion window and slow start is begun. | congestion window MUST be reduced to the minimum congestion window | |||
| and slow start is re-entered. | ||||
| 4.6. Pacing Rate | 4.6. Pacing | |||
| The pacing rate is a function of the mode, the congestion window, and | It is RECOMMENDED that a sender pace sending of all data, | |||
| the smoothed rtt. Specifically, the pacing rate is 2 times the | distributing the congestion window over the SRTT. This document does | |||
| congestion window divided by the smoothed RTT during slow start and | not specify a pacer. As an example pacer, implementers are referred | |||
| 1.25 times the congestion window divided by the smoothed RTT during | to the Fair Queue packet scheduler (fq qdisc) in Linux (3.11 onwards) | |||
| congestion avoidance. In order to fairly compete with flows that are | as a well-known and publicly available implementation of a flow | |||
| not pacing, it is recommended to not pace the first 10 sent packets | pacer. | |||
| when exiting quiescence. | ||||
| 4.7. Pseudocode | 4.7. Pseudocode | |||
| 4.7.1. Constants of interest | 4.7.1. Constants of interest | |||
| Constants used in congestion control are based on a combination of | Constants used in congestion control are based on a combination of | |||
| RFCs, papers, and common practice. Some may need to be changed or | RFCs, papers, and common practice. Some may need to be changed or | |||
| negotiated in order to better suit a variety of environments. | negotiated in order to better suit a variety of environments. | |||
| kDefaultMss (default 1460 bytes): The default max packet size used | kDefaultMss (default 1460 bytes): The default max packet size used | |||
| skipping to change at page 22, line 43 ¶ | skipping to change at page 22, line 46 ¶ | |||
| acked_packet from sent_packets. | acked_packet from sent_packets. | |||
| OnPacketAckedCC(acked_packet): | OnPacketAckedCC(acked_packet): | |||
| // Remove from bytes_in_flight. | // Remove from bytes_in_flight. | |||
| bytes_in_flight -= acked_packet.bytes | bytes_in_flight -= acked_packet.bytes | |||
| if (acked_packet.packet_number < end_of_recovery): | if (acked_packet.packet_number < end_of_recovery): | |||
| // Do not increase congestion window in recovery period. | // Do not increase congestion window in recovery period. | |||
| return | return | |||
| if (congestion_window < ssthresh): | if (congestion_window < ssthresh): | |||
| // Slow start. | // Slow start. | |||
| congestion_window += acked_packets.bytes | congestion_window += acked_packet.bytes | |||
| else: | else: | |||
| // Congestion avoidance. | // Congestion avoidance. | |||
| congestion_window += | congestion_window += | |||
| kDefaultMss * acked_packets.bytes / congestion_window | kDefaultMss * acked_packet.bytes / congestion_window | |||
| 4.7.6. On Packets Lost | 4.7.6. On Packets Lost | |||
| Invoked by loss detection from DetectLostPackets when new packets are | Invoked by loss detection from DetectLostPackets when new packets are | |||
| detected lost. | detected lost. | |||
| OnPacketsLost(lost_packets): | OnPacketsLost(lost_packets): | |||
| // Remove lost packets from bytes_in_flight. | // Remove lost packets from bytes_in_flight. | |||
| for (lost_packet : lost_packets): | for (lost_packet : lost_packets): | |||
| bytes_in_flight -= lost_packet.bytes | bytes_in_flight -= lost_packet.bytes | |||
| skipping to change at page 23, line 42 ¶ | skipping to change at page 23, line 42 ¶ | |||
| This document has no IANA actions. Yet. | This document has no IANA actions. Yet. | |||
| 6. References | 6. References | |||
| 6.1. Normative References | 6.1. Normative References | |||
| [QUIC-TRANSPORT] | [QUIC-TRANSPORT] | |||
| Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based | |||
| Multiplexed and Secure Transport", draft-ietf-quic- | Multiplexed and Secure Transport", draft-ietf-quic- | |||
| transport-00 (work in progress), December 2017. | transport-09 (work in progress), January 2018. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC4653] Bhandarkar, S., Reddy, A., Allman, M., and E. Blanton, | [RFC4653] Bhandarkar, S., Reddy, A., Allman, M., and E. Blanton, | |||
| "Improving the Robustness of TCP to Non-Congestion | "Improving the Robustness of TCP to Non-Congestion | |||
| Events", RFC 4653, DOI 10.17487/RFC4653, August 2006, | Events", RFC 4653, DOI 10.17487/RFC4653, August 2006, | |||
| <https://www.rfc-editor.org/info/rfc4653>. | <https://www.rfc-editor.org/info/rfc4653>. | |||
| skipping to change at page 25, line 25 ¶ | skipping to change at page 25, line 25 ¶ | |||
| [3] https://github.com/quicwg/base-drafts/labels/-recovery | [3] https://github.com/quicwg/base-drafts/labels/-recovery | |||
| Appendix A. Acknowledgments | Appendix A. Acknowledgments | |||
| Appendix B. Change Log | Appendix B. Change Log | |||
| *RFC Editor's Note:* Please remove this section prior to | *RFC Editor's Note:* Please remove this section prior to | |||
| publication of a final version of this document. | publication of a final version of this document. | |||
| B.1. Since draft-ietf-quic-recovery-06 | B.1. Since draft-ietf-quic-recovery-08 | |||
| Nothing yet. | o Clarified pacing and RTO (#967, #977) | |||
| B.2. Since draft-ietf-quic-recovery-05 | B.2. Since draft-ietf-quic-recovery-07 | |||
| o Include Ack Delay in RTO(and TLP) computations (#981) | ||||
| o Ack Delay in SRTT computation (#961) | ||||
| o Default RTT and Slow Start (#590) | ||||
| o Many editorial fixes. | ||||
| B.3. Since draft-ietf-quic-recovery-06 | ||||
| No significant changes. | ||||
| B.4. Since draft-ietf-quic-recovery-05 | ||||
| o Add more congestion control text (#776) | o Add more congestion control text (#776) | |||
| B.3. Since draft-ietf-quic-recovery-04 | B.5. Since draft-ietf-quic-recovery-04 | |||
| No significant changes. | No significant changes. | |||
| B.4. Since draft-ietf-quic-recovery-03 | B.6. Since draft-ietf-quic-recovery-03 | |||
| No significant changes. | No significant changes. | |||
| B.5. Since draft-ietf-quic-recovery-02 | B.7. Since draft-ietf-quic-recovery-02 | |||
| o Integrate F-RTO (#544, #409) | o Integrate F-RTO (#544, #409) | |||
| o Add congestion control (#545, #395) | o Add congestion control (#545, #395) | |||
| o Require connection abort if a skipped packet was acknowledged | o Require connection abort if a skipped packet was acknowledged | |||
| (#415) | (#415) | |||
| o Simplify RTO calculations (#142, #417) | o Simplify RTO calculations (#142, #417) | |||
| B.6. Since draft-ietf-quic-recovery-01 | B.8. Since draft-ietf-quic-recovery-01 | |||
| o Overview added to loss detection | o Overview added to loss detection | |||
| o Changes initial default RTT to 100ms | o Changes initial default RTT to 100ms | |||
| o Added time-based loss detection and fixes early retransmit | o Added time-based loss detection and fixes early retransmit | |||
| o Clarified loss recovery for handshake packets | o Clarified loss recovery for handshake packets | |||
| o Fixed references and made TCP references informative | o Fixed references and made TCP references informative | |||
| B.7. Since draft-ietf-quic-recovery-00 | B.9. Since draft-ietf-quic-recovery-00 | |||
| o Improved description of constants and ACK behavior | o Improved description of constants and ACK behavior | |||
| B.8. Since draft-iyengar-quic-loss-recovery-01 | B.10. Since draft-iyengar-quic-loss-recovery-01 | |||
| o Adopted as base for draft-ietf-quic-recovery | o Adopted as base for draft-ietf-quic-recovery | |||
| o Updated authors/editors list | o Updated authors/editors list | |||
| o Added table of contents | o Added table of contents | |||
| Authors' Addresses | Authors' Addresses | |||
| Jana Iyengar (editor) | Jana Iyengar (editor) | |||
| End of changes. 31 change blocks. | ||||
| 101 lines changed or deleted | 119 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||