| draft-ietf-quic-recovery-09.txt | draft-ietf-quic-recovery-10.txt | |||
|---|---|---|---|---|
| QUIC J. Iyengar, Ed. | QUIC J. Iyengar, Ed. | |||
| Internet-Draft I. Swett, Ed. | Internet-Draft Fastly | |||
| Intended status: Standards Track Google | Intended status: Standards Track I. Swett, Ed. | |||
| Expires: August 1, 2018 January 28, 2018 | Expires: September 6, 2018 Google | |||
| March 05, 2018 | ||||
| QUIC Loss Detection and Congestion Control | QUIC Loss Detection and Congestion Control | |||
| draft-ietf-quic-recovery-09 | draft-ietf-quic-recovery-10 | |||
| 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 42 ¶ | |||
| 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 August 1, 2018. | This Internet-Draft will expire on September 6, 2018. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2018 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 | |||
| skipping to change at page 3, line 10 ¶ | skipping to change at page 3, line 12 ¶ | |||
| 4.6. Pacing . . . . . . . . . . . . . . . . . . . . . . . . . 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 . . . . . . . . . . . . . . . . . . . . . . . . . 24 | |||
| 6.1. Normative References . . . . . . . . . . . . . . . . . . 23 | 6.1. Normative References . . . . . . . . . . . . . . . . . . 24 | |||
| 6.2. Informative References . . . . . . . . . . . . . . . . . 24 | 6.2. Informative References . . . . . . . . . . . . . . . . . 25 | |||
| 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-08 . . . . . . . . . . . . 25 | B.1. Since draft-ietf-quic-recovery-09 . . . . . . . . . . . . 25 | |||
| B.2. Since draft-ietf-quic-recovery-07 . . . . . . . . . . . . 25 | B.2. Since draft-ietf-quic-recovery-08 . . . . . . . . . . . . 26 | |||
| B.3. Since draft-ietf-quic-recovery-06 . . . . . . . . . . . . 25 | B.3. Since draft-ietf-quic-recovery-07 . . . . . . . . . . . . 26 | |||
| B.4. Since draft-ietf-quic-recovery-05 . . . . . . . . . . . . 25 | B.4. Since draft-ietf-quic-recovery-06 . . . . . . . . . . . . 26 | |||
| B.5. Since draft-ietf-quic-recovery-04 . . . . . . . . . . . . 25 | B.5. Since draft-ietf-quic-recovery-05 . . . . . . . . . . . . 26 | |||
| B.6. Since draft-ietf-quic-recovery-03 . . . . . . . . . . . . 26 | B.6. Since draft-ietf-quic-recovery-04 . . . . . . . . . . . . 26 | |||
| B.7. Since draft-ietf-quic-recovery-02 . . . . . . . . . . . . 26 | B.7. Since draft-ietf-quic-recovery-03 . . . . . . . . . . . . 26 | |||
| B.8. Since draft-ietf-quic-recovery-01 . . . . . . . . . . . . 26 | B.8. Since draft-ietf-quic-recovery-02 . . . . . . . . . . . . 26 | |||
| B.9. Since draft-ietf-quic-recovery-00 . . . . . . . . . . . . 26 | B.9. Since draft-ietf-quic-recovery-01 . . . . . . . . . . . . 26 | |||
| B.10. Since draft-iyengar-quic-loss-recovery-01 . . . . . . . . 26 | B.10. Since draft-ietf-quic-recovery-00 . . . . . . . . . . . . 27 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | B.11. Since draft-iyengar-quic-loss-recovery-01 . . . . . . . . 27 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 | ||||
| 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, | |||
| described in RFCs, various Internet-drafts, and also those prevalent | described in RFCs, various Internet-drafts, and also those prevalent | |||
| skipping to change at page 17, line 28 ¶ | skipping to change at page 17, line 28 ¶ | |||
| if (num_retransmittable_packets_outstanding == 0): | if (num_retransmittable_packets_outstanding == 0): | |||
| loss_detection_alarm.cancel() | loss_detection_alarm.cancel() | |||
| return | return | |||
| if (handshake packets are outstanding): | if (handshake packets are outstanding): | |||
| // Handshake retransmission alarm. | // Handshake retransmission alarm. | |||
| if (smoothed_rtt == 0): | if (smoothed_rtt == 0): | |||
| alarm_duration = 2 * kDefaultInitialRtt | alarm_duration = 2 * kDefaultInitialRtt | |||
| else: | else: | |||
| alarm_duration = 2 * smoothed_rtt | alarm_duration = 2 * smoothed_rtt | |||
| alarm_duration = max(alarm_duration, kMinTLPTimeout) | alarm_duration = max(alarm_duration + max_ack_delay, | |||
| kMinTLPTimeout) | ||||
| alarm_duration = alarm_duration * (2 ^ handshake_count) | alarm_duration = alarm_duration * (2 ^ handshake_count) | |||
| else if (loss_time != 0): | else if (loss_time != 0): | |||
| // Early retransmit timer or time loss detection. | // Early retransmit timer or time loss detection. | |||
| alarm_duration = loss_time - time_of_last_sent_packet | alarm_duration = loss_time - time_of_last_sent_packet | |||
| else if (tlp_count < kMaxTLPs): | else if (tlp_count < kMaxTLPs): | |||
| // Tail Loss Probe | // Tail Loss Probe | |||
| alarm_duration = max(1.5 * smoothed_rtt + max_ack_delay, | alarm_duration = max(1.5 * smoothed_rtt + max_ack_delay, | |||
| kMinTLPTimeout) | kMinTLPTimeout) | |||
| else: | else: | |||
| // RTO alarm | // RTO alarm | |||
| alarm_duration = smoothed_rtt + 4 * rttvar | alarm_duration = | |||
| smoothed_rtt + 4 * rttvar + max_ack_delay | ||||
| alarm_duration = max(alarm_duration, kMinRTOTimeout) | alarm_duration = max(alarm_duration, kMinRTOTimeout) | |||
| alarm_duration = alarm_duration * (2 ^ rto_count) | alarm_duration = alarm_duration * (2 ^ rto_count) | |||
| loss_detection_alarm.set(time_of_last_sent_packet | loss_detection_alarm.set(time_of_last_sent_packet | |||
| + alarm_duration) | + alarm_duration) | |||
| 3.4.8. On Alarm Firing | 3.4.8. On Alarm Firing | |||
| QUIC uses one loss recovery alarm, which when set, can be in one of | QUIC uses one loss recovery alarm, which when set, can be in one of | |||
| several modes. When the alarm fires, the mode determines the action | several modes. When the alarm fires, the mode determines the action | |||
| skipping to change at page 22, line 38 ¶ | skipping to change at page 23, line 5 ¶ | |||
| increases bytes_in_flight. | increases bytes_in_flight. | |||
| OnPacketSentCC(bytes_sent): | OnPacketSentCC(bytes_sent): | |||
| bytes_in_flight += bytes_sent | bytes_in_flight += bytes_sent | |||
| 4.7.5. On Packet Acknowledgement | 4.7.5. On Packet Acknowledgement | |||
| Invoked from loss detection's OnPacketAcked and is supplied with | Invoked from loss detection's OnPacketAcked and is supplied with | |||
| acked_packet from sent_packets. | acked_packet from sent_packets. | |||
| InRecovery(packet_number) | ||||
| return packet_number <= end_of_recovery | ||||
| 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 (InRecovery(acked_packet.packet_number)): | |||
| // 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_packet.bytes | congestion_window += acked_packet.bytes | |||
| else: | else: | |||
| // Congestion avoidance. | // Congestion avoidance. | |||
| congestion_window += | congestion_window += | |||
| kDefaultMss * acked_packet.bytes / congestion_window | kDefaultMss * acked_packet.bytes / congestion_window | |||
| skipping to change at page 23, line 17 ¶ | skipping to change at page 23, line 34 ¶ | |||
| 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 | |||
| largest_lost_packet = lost_packets.last() | largest_lost_packet = lost_packets.last() | |||
| // Start a new recovery epoch if the lost packet is larger | // Start a new recovery epoch if the lost packet is larger | |||
| // than the end of the previous recovery epoch. | // than the end of the previous recovery epoch. | |||
| if (end_of_recovery < largest_lost_packet.packet_number): | if (!InRecovery(largest_lost_packet.packet_number)): | |||
| end_of_recovery = largest_sent_packet | end_of_recovery = largest_sent_packet | |||
| congestion_window *= kLossReductionFactor | congestion_window *= kLossReductionFactor | |||
| congestion_window = max(congestion_window, kMinimumWindow) | congestion_window = max(congestion_window, kMinimumWindow) | |||
| ssthresh = congestion_window | ssthresh = congestion_window | |||
| 4.7.7. On Retransmission Timeout Verified | 4.7.7. On Retransmission Timeout Verified | |||
| QUIC decreases the congestion window to the minimum value once the | QUIC decreases the congestion window to the minimum value once the | |||
| retransmission timeout has been verified. | retransmission timeout has been verified. | |||
| skipping to change at page 23, line 42 ¶ | skipping to change at page 24, line 12 ¶ | |||
| 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-09 (work in progress), January 2018. | transport-10 (work in progress), March 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 46 ¶ | |||
| [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-08 | B.1. Since draft-ietf-quic-recovery-09 | |||
| No significant changes. | ||||
| B.2. Since draft-ietf-quic-recovery-08 | ||||
| o Clarified pacing and RTO (#967, #977) | o Clarified pacing and RTO (#967, #977) | |||
| B.2. Since draft-ietf-quic-recovery-07 | B.3. Since draft-ietf-quic-recovery-07 | |||
| o Include Ack Delay in RTO(and TLP) computations (#981) | o Include Ack Delay in RTO(and TLP) computations (#981) | |||
| o Ack Delay in SRTT computation (#961) | o Ack Delay in SRTT computation (#961) | |||
| o Default RTT and Slow Start (#590) | o Default RTT and Slow Start (#590) | |||
| o Many editorial fixes. | o Many editorial fixes. | |||
| B.3. Since draft-ietf-quic-recovery-06 | B.4. Since draft-ietf-quic-recovery-06 | |||
| No significant changes. | No significant changes. | |||
| B.4. Since draft-ietf-quic-recovery-05 | B.5. Since draft-ietf-quic-recovery-05 | |||
| o Add more congestion control text (#776) | o Add more congestion control text (#776) | |||
| B.5. Since draft-ietf-quic-recovery-04 | B.6. Since draft-ietf-quic-recovery-04 | |||
| No significant changes. | No significant changes. | |||
| B.6. Since draft-ietf-quic-recovery-03 | B.7. Since draft-ietf-quic-recovery-03 | |||
| No significant changes. | No significant changes. | |||
| B.7. Since draft-ietf-quic-recovery-02 | B.8. 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.8. Since draft-ietf-quic-recovery-01 | B.9. 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.9. Since draft-ietf-quic-recovery-00 | B.10. Since draft-ietf-quic-recovery-00 | |||
| o Improved description of constants and ACK behavior | o Improved description of constants and ACK behavior | |||
| B.10. Since draft-iyengar-quic-loss-recovery-01 | B.11. 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) | |||
| Fastly | ||||
| Email: jri.ietf@gmail.com | ||||
| Email: jri@google.com | ||||
| Ian Swett (editor) | Ian Swett (editor) | |||
| Email: ianswett@google.com | Email: ianswett@google.com | |||
| End of changes. 24 change blocks. | ||||
| 37 lines changed or deleted | 48 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/ | ||||