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

[API Proposal]: Quic connection keep alive #70090

Closed
bentoi opened this issue Jun 1, 2022 · 2 comments · Fixed by #94211
Closed

[API Proposal]: Quic connection keep alive #70090

bentoi opened this issue Jun 1, 2022 · 2 comments · Fixed by #94211
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net.Quic
Milestone

Comments

@bentoi
Copy link

bentoi commented Jun 1, 2022

Background and motivation

An application protocol such as HTTP/3 needs to enable the transport keep alive to defer the Quic idle timeout (https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-idle-connections). It should also be able to do so only if there's pending requests or server pushes.

From looking at the msquic implementation, the keep alive interval can be updated on an active Quic connection. So this could be set through a new QuicConnection property.

Such a feature will also probably needed to implement keep alive in System.Net.Http.SocketsHttpHandler.Http3Connection.

API Proposal

namespace System.Net.Quic;

public sealed class QuicConnection : IDisposable
{
    // <summary>The keep alive interval to specify how often to send PING frames.</summary>
    public TimeSpan KeepAliveInterval { get; set; }
}

API Usage

// Enable keep alive
connection.KeepAliveInterval = TimeSpan.FromSeconds(15);

// Disable keep alive
connection.KeepAliveInterval = TimeSpan.MaxValue;

Alternative Designs

No response

Risks

No response

@bentoi bentoi added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Jun 1, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 1, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Quic and removed untriaged New issue has not been triaged by the area owner labels Jun 1, 2022
@ghost
Copy link

ghost commented Jun 1, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Background and motivation

An application protocol such as HTTP/3 needs to enable the transport keep alive to defer the Quic idle timeout (https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-idle-connections). It should also be able to do so only if there's pending requests or server pushes.

From looking at the msquic implementation, the keep alive interval can be updated on an active Quic connection. So this could be set through a new QuicConnection property.

Such a feature will also probably needed to implement keep alive in System.Net.Http.SocketsHttpHandler.Http3Connection.

API Proposal

namespace System.Net.Quic;

public sealed class QuicConnection : IDisposable
{
    // <summary>The keep alive interval to specify how often to send PING frames.</summary>
    public TimeSpan KeepAliveInterval { get; set; }
}

API Usage

// Enable keep alive
connection.KeepAliveInterval = TimeSpan.FromSeconds(15);

// Disable keep alive
connection.KeepAliveInterval = TimeSpan.MaxValue;

Alternative Designs

No response

Risks

No response

Author: bentoi
Assignees: -
Labels:

api-suggestion, area-System.Net.Quic

Milestone: -

@bentoi bentoi changed the title [API Proposal]: Quic NegotiatedIdleTimeout and keep alive [API Proposal]: Quic connection keep alive Jun 1, 2022
@ManickaP ManickaP added the untriaged New issue has not been triaged by the area owner label Jun 1, 2022
@karelz karelz added this to the 7.0.0 milestone Jun 14, 2022
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Jun 14, 2022
@karelz karelz modified the milestones: 7.0.0, Future Jun 28, 2022
@karelz
Copy link
Member

karelz commented Jun 28, 2022

Triage: We can add it later into QuicConnectionOptions

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Nov 28, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Nov 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2023
@karelz karelz modified the milestones: Future, 9.0.0 May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net.Quic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants