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

connection timeout or keepalive #382

Open
mschirrmeister opened this issue Apr 24, 2024 · 1 comment
Open

connection timeout or keepalive #382

mschirrmeister opened this issue Apr 24, 2024 · 1 comment

Comments

@mschirrmeister
Copy link

Hello,

while searching for keepalive settings or a timeout option for upstream resolvers, I found this old issue #324 which mentions a hard coded idle timeout for TCP and DoT.

I am more interested in the setting for DoH3 and DoQ. After some testing I noticed it seems to be the following.

  • DoQ - 5 seconds
  • DoH3 - 30 seconds

Is this correct? At least I see a new connection via a packet capture, when I send a request after the times above.

Besides the idle timeout, do you think a keepalive setting could be useful? Maybe with an internal logic, if there is no client query for n amount of minutes, it gets turned down anyway.

@folbricht
Copy link
Owner

DoQ:

I looked at the different config options for quic.

HandshakeIdleTimeout is currently set to the same value as query-timeout which defaults to 2s

    // HandshakeIdleTimeout is the idle timeout before completion of the handshake.
    // If we don't receive any packet from the peer within this time, the connection attempt is aborted.
    // Additionally, if the handshake doesn't complete in twice this time, the connection attempt is also aborted.
    // If this value is zero, the timeout is set to 5 seconds.
    HandshakeIdleTimeout time.Duration

MaxIdleTimeout is not set and not currently configurable

    // MaxIdleTimeout is the maximum duration that may pass without any incoming network activity.
    // The actual value for the idle timeout is the minimum of this value and the peer's.
    // This value only applies after the handshake has completed.
    // If the timeout is exceeded, the connection is closed.
    // If this value is zero, the timeout is set to 30 seconds.
    MaxIdleTimeout time.Duration

KeepAlivePeriod is also not set and not configurable

    // KeepAlivePeriod defines whether this peer will periodically send a packet to keep the connection alive.
    // If set to 0, then no keep alive is sent. Otherwise, the keep alive is sent on that period (or at most
    // every half of MaxIdleTimeout, whichever is smaller).
    KeepAlivePeriod time.Duration

DoH3:

Has the same settings but none are set by routedns or are configurable yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants