Skip to content

Do not derive DNS query timeout from RTT #7974

Closed

Description

@ott

Submission type

Request for enhancement (RFE)

systemd version the issue has been seen with

master

Description

At the moment systemd-resolved measures the RTT of DNS queries and adjusts its query timeout based on the RTT. This makes only sense for iterative resolvers that query authoritative servers that have their zones in memory or on disk. A stub resolver like systemd-resolved sets the RD bit and forwards the query to an upstream resolver. The upstream resolver then tries to resolve the query under a timeout.

So the resend timeout of systemd-resolved should be t + RTT where t is the timeout of the upstream resolver and RTT is the network RTT. systemd-resolved would have to measure RTT separately and continously, for example with a query with an empty question section or a query for the SOA RR of the root zone. However, this requires significant changes to systemd-resolved. So it seems best to postpone them until #7617 has been addressed.

At the moment I would suggest to set resend timeout to a fixed value. BIND seems to use a timeout of 10 s, so perhaps 12 s is reasonable value. If we assume that the we are going to retry, it could be less. DNS_SERVER_FEATURE_RETRY_ATTEMPTS * DNS_TIMEOUT_MAX_USEC = 15 s at the moment. So it should be enough to set the resend timeout to DNS_TIMEOUT_MAX_USEC. I have a short patch prepared for this change and can submit a pull request if this change seems reasonable.

Activity

  1. added
    RFE 🎁
    on Jan 26, 2018
  2. ott commented on May 22, 2018

    @ott
    ContributorAuthor

    There has been no response on whether a patch would be accepted. I think I will submit a pull request once #8849 has been merged. It might also solve #8451.

  3. poettering commented on Jun 8, 2018

    @poettering
    Member

    Yes, please submit a patch, would be happy to review!

  4. ott commented on Jun 11, 2018

    @ott
    ContributorAuthor

    I submitted it as pull request #9264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁resolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions