Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change idle_timeout to max_idle_timeout #3099

Merged
merged 24 commits into from Jan 21, 2020
Merged
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
61a3725
Idle timeout indicates you will timeout then
ianswett Oct 16, 2019
dc5b220
Update draft-ietf-quic-transport.md
ianswett Oct 16, 2019
2537a1a
Martin's suggestion and some reordering
ianswett Oct 29, 2019
61dcaad
Update draft-ietf-quic-transport.md
ianswett Oct 29, 2019
6fd0ac8
Update draft-ietf-quic-transport.md
ianswett Oct 29, 2019
e4dd819
Kazuho's suggestions
ianswett Oct 29, 2019
2234623
Update draft-ietf-quic-transport.md
ianswett Nov 1, 2019
11d8da8
Update draft-ietf-quic-transport.md
ianswett Nov 1, 2019
508413d
Update draft-ietf-quic-transport.md
ianswett Nov 1, 2019
e0d76ce
Update draft-ietf-quic-transport.md
ianswett Nov 1, 2019
48f04d6
Update draft-ietf-quic-transport.md
ianswett Nov 1, 2019
a7232f1
Update draft-ietf-quic-transport.md
ianswett Nov 2, 2019
ec80c86
Update draft-ietf-quic-transport.md
ianswett Nov 2, 2019
cd47d62
Update draft-ietf-quic-transport.md
ianswett Nov 2, 2019
7a6d513
Update draft-ietf-quic-transport.md
ianswett Nov 2, 2019
0bfcf11
Update draft-ietf-quic-transport.md
ianswett Nov 2, 2019
210821b
Merge branch 'master' into ianswett-symmetric-timeout
ianswett Nov 2, 2019
07d63d9
Jana's comment
ianswett Nov 3, 2019
e74856d
Update draft-ietf-quic-transport.md
ianswett Nov 18, 2019
581a368
Marten's suggestion
ianswett Nov 20, 2019
875de3f
Rebuild
ianswett Nov 20, 2019
774bc68
Use idle timer more directly
martinthomson Dec 11, 2019
c559540
wrap
martinthomson Dec 11, 2019
a203af6
Merge branch 'master' into ianswett-symmetric-timeout
martinthomson Jan 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 33 additions & 30 deletions draft-ietf-quic-transport.md
Expand Up @@ -2344,28 +2344,30 @@ source address.

## Idle Timeout {#idle-timeout}

If the idle timeout is enabled, a connection is silently closed and the state is
discarded when it remains idle for longer than both the advertised
If the idle timeout is enabled by either peer, a connection is silently closed
and the state is discarded when it remains idle for longer than the max
ianswett marked this conversation as resolved.
Show resolved Hide resolved
idle timeout (see {{transport-parameter-definitions}}) and three times the
ianswett marked this conversation as resolved.
Show resolved Hide resolved
current Probe Timeout (PTO).

Each endpoint advertises its own idle timeout to its peer. An endpoint
restarts any timer it maintains when a packet from its peer is received and
processed successfully. The timer is also restarted when sending a packet
containing frames other than ACK or PADDING (an ack-eliciting packet; see
{{QUIC-RECOVERY}}), but only if no other ack-eliciting packets have been sent
since last receiving a packet. Restarting when sending packets ensures that
connections do not prematurely time out when initiating new activity.

The value for an idle timeout can be asymmetric. The value advertised by an
endpoint is only used to determine whether the connection is live at that
endpoint. An endpoint that sends packets near the end of the idle timeout
period of a peer risks having those packets discarded if its peer enters the
draining state before the packets arrive. If a peer could timeout within a
Probe Timeout (PTO; see Section 6.3 of {{QUIC-RECOVERY}}), it is advisable to
test for liveness before sending any data that cannot be retried safely. Note
that it is likely that only applications or application protocols will
know what information can be retried.
Each endpoint advertises a different max idle timeout, but the effective value
ianswett marked this conversation as resolved.
Show resolved Hide resolved
is determined by taking the minimum of the two advertised values. By announcing
ianswett marked this conversation as resolved.
Show resolved Hide resolved
a max idle timeout, endpoints commit to initiating an immediate close
ianswett marked this conversation as resolved.
Show resolved Hide resolved
({{immediate-close}}) if it abandons a connection prior to the effective value.
ianswett marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this sentence... what does it mean for an endpoint to initiate an immediate close if it abandons the connection prior to the min? I thought that the endpoint was to initiate an immediate close at the min. Why are we talking about abandoning?


An endpoint restarts any timer it maintains when a packet from its peer is
martinthomson marked this conversation as resolved.
Show resolved Hide resolved
received and processed successfully. The timer is also restarted when sending
martinthomson marked this conversation as resolved.
Show resolved Hide resolved
a packet containing frames other than ACK or PADDING (an ack-eliciting packet;
see {{QUIC-RECOVERY}}), but only if no other ack-eliciting packets have been
sent since last receiving a packet. Restarting when sending packets ensures
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you write some rationale for these restarting rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also pre-existing text, so maybe in a different PR?

that connections do not prematurely time out when initiating new activity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to explain why you restart when sending, you might need to explain why you don't restart when sending subsequent packets. Perhaps "when sending one or more packets" might help point this explanation at bursts, rather than at individual packets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also pre-existing.


An endpoint that sends packets near the end of its peer's idle timeout period
ianswett marked this conversation as resolved.
Show resolved Hide resolved
risks having those packets discarded if its peer enters the draining state
before the packets arrive. If a peer could time out within an Probe Timeout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a great construction: "If a peer could time out within a Probe Timeout". It's also confusing ... maybe change this to "When an endpoint is about to send data that cannot be retried safely, it is possible that the peer may have reached the end of its idle timeout period before this data arrives at the peer. To avoid such situations, it is recommended that an endpoint test for liveness when it expects that the peer might be close, within a Probe Timeout (PTO; see Section ...) period for instance, to the end of its idle timeout period."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I'll file an issue to address your and Mike's comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the text should be fixed here... why introduce text here and then fix it in a new PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not introducing this text, it just moved, hence the different PR, which is editorial.

(PTO; see Section 6.2.2 of {{QUIC-RECOVERY}}), it is advisable to test for
liveness before sending any data that cannot be retried safely. Note that it is
likely that only applications or application protocols will know what
information can be retried.


## Immediate Close
Expand Down Expand Up @@ -4354,7 +4356,7 @@ language from Section 3 of {{!TLS13=RFC8446}}.
~~~
enum {
original_connection_id(0),
idle_timeout(1),
max_idle_timeout(1),
stateless_reset_token(2),
max_packet_size(3),
initial_max_data(4),
Expand Down Expand Up @@ -4414,11 +4416,11 @@ original_connection_id (0x0000):
server MUST include the original_connection_id transport parameter if it sent
a Retry packet.

idle_timeout (0x0001):
max_idle_timeout (0x0001):

: The idle timeout is a value in milliseconds that is encoded as an integer; see
({{idle-timeout}}). If this parameter is absent or zero then the idle
timeout is disabled.
: The max idle timeout is a value in milliseconds that is encoded as an integer;
see ({{idle-timeout}}). Idle timeout is disabled when this parameter is
absent or zero on both sides.
ianswett marked this conversation as resolved.
Show resolved Hide resolved

stateless_reset_token (0x0002):

Expand Down Expand Up @@ -4593,11 +4595,12 @@ endpoints send PING frames without coordination can produce an excessive number
of packets and poor performance.

A connection will time out if no packets are sent or received for a period
longer than the time specified in the idle_timeout transport parameter (see
{{termination}}). However, state in middleboxes might time out earlier than
that. Though REQ-5 in {{?RFC4787}} recommends a 2 minute timeout interval,
experience shows that sending packets every 15 to 30 seconds is necessary to
prevent the majority of middleboxes from losing state for UDP flows.
longer than the time negotiated using the max_idle_timeout transport parameter
(see {{termination}}). However, state in middleboxes might time out earlier
than that. Though REQ-5 in {{?RFC4787}} recommends a 2 minute timeout
interval, experience shows that sending packets every 15 to 30 seconds is
necessary to prevent the majority of middleboxes from losing state for UDP
flows.


## ACK Frames {#frame-ack}
Expand Down Expand Up @@ -5860,7 +5863,7 @@ The initial contents of this registry are shown in {{iana-tp-table}}.
| Value | Parameter Name | Specification |
|:-------|:----------------------------|:------------------------------------|
| 0x0000 | original_connection_id | {{transport-parameter-definitions}} |
| 0x0001 | idle_timeout | {{transport-parameter-definitions}} |
| 0x0001 | max_idle_timeout | {{transport-parameter-definitions}} |
| 0x0002 | stateless_reset_token | {{transport-parameter-definitions}} |
| 0x0003 | max_packet_size | {{transport-parameter-definitions}} |
| 0x0004 | initial_max_data | {{transport-parameter-definitions}} |
Expand Down