-
Notifications
You must be signed in to change notification settings - Fork 3
Keepalive component after QUIC connection is established #6
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
Comments
I recall something in the If we do need to implement keep alive logic here are a few ideas,
|
No it isn't automatic. There is a specific function you have to call to initiate a ping frame in case of idleness.
5 May 2023 12:15:18 Brian Botha ***@***.***>:
…
I recall something in the *quic* RFC about ping frames being sent if a timeout were to happen soon. So I think keep alive is built into quic? It's something I'll have to check.
If we do need to implement keep alive logic here are a few ideas,
1. *Quic* has ping frames, if it's not automatic then there may be a way to manually trigger them?
2. If we had to implement something then we can create a single stream to send our own ping/pong messages.
—
Reply to this email directly, view it on GitHub[#6 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAE4OHOGEDUUSBUN3SNKQC3XERPDHANCNFSM6AAAAAAWZXMLRA].
You are receiving this because you authored the thread.[Tracking image][https://github.com/notifications/beacon/AAE4OHMGV2D742ZGH5D3PADXERPDHA5CNFSM6AAAAAAWZXMLRCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS3Q6MJI.gif]
|
Looking over the quiche docs, the only mention of the ping frame is for the If I understand it correctly, After calling So to implement the keep-alive we just need to call So changes that need to be made.
|
* Done adding the feature, * Still need to write tests * Related #6 [ci skip]
Instead of a |
Both sides doing timeouts looks something like this.
|
This was fixed by d542dcb but I put the wrong issue id in the commit message, Resolving this. |
Specification
After the QUIC connection is established, there's a max idle timeout. Nothing actually keeps the connection alive. If there's no activity on the connection either by stream data or datagram data, then the connection will timeout and be destroyed. Once destroyed, the
QUICClient
is destroyed, or theQUICServer
removes it from the connection map.We should have a interval loop that keeps the connection alive. This will be important for any connection that we need to maintain the NAT mappings. Which usually activity under 20 seconds.
One way to do this is with the send_ack_eliciting method. This method will queue up a PING frame if it detects there's nothing in the send queue that will keep the connection alive (and by nothing we mean something that will trigger an acknowledgement from the remote end).
I imagine that this can be done from both ends, the client and server. So both sides are capable of sending a PING frame and elicit an acknowledgement.
The function call is a noop if there's stuff ihttps://github.com//issues/1#issuecomment-1501236254n the queue that will keep the connection alive anyway.
We should add in a
keepaliveIntervalTime
that maintains the connection liveness toQUICConnection
. This can be added to theconfig
, although it's not actually used by thebuildQuicheConfig
.Alternatively it can be an extra parameter to the
QUICConnection
itself.I think this loop will be rather easy. It can be a
setTimeout
loop that just calls that function repeatedly. However this loop can only start once the connection is established, and the loop must not be running when the connection is closing or draining.Additional context
send_ack_eliciting
dgram
module #1 (comment) - original comment about bringing this inTasks
keepAliveTime
option toQUICConnection
, propagate from bothQUICClient
andQUICServer
.The text was updated successfully, but these errors were encountered: