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

Make maximum upstream querying time configurable #2280

Closed
RiverKy opened this issue Nov 8, 2020 · 10 comments
Closed

Make maximum upstream querying time configurable #2280

RiverKy opened this issue Nov 8, 2020 · 10 comments

Comments

@RiverKy
Copy link

RiverKy commented Nov 8, 2020

Problem Description

If multiple encrypted DNS added as upstream servers, it's sometimes slow when querying all of specified servers. So sometimes clients resolving hosts with AdGuard Home will throw a timeout to user.

Proposed Solution

Add an option to limit maximum upstream querying time, if time exceeded, just response the record already received to the client.

By the way, are there any public DoQ (DNS over QUIC) servers available now? Seems like this would improve the time of querying upstreams.
Thanks.

@ameshkov
Copy link
Member

ameshkov commented Nov 9, 2020

So you'd like the default timeout to be configurable?

By the way, are there any public DoQ (DNS over QUIC) servers available now? Seems like this would improve the time of querying upstreams.

For now, the only one is AdGuard DNS.

@RiverKy
Copy link
Author

RiverKy commented Nov 10, 2020

So you'd like the default timeout to be configurable?

Yeah I’d love to.
So what is the timeout by default?
Thanks for your reply...

@ameshkov
Copy link
Member

As I recall, by default it is 10 seconds

@lyaaz
Copy link

lyaaz commented Dec 27, 2020

yeah, it's terrible to wait for 10 secs for a dns query if one of the upstream servers dead.

@ameshkov ameshkov changed the title [Feature Request] Maximum upstream querying time. Make maximum upstream querying time configurable Dec 27, 2020
@ainar-g ainar-g self-assigned this Jun 3, 2021
@ainar-g ainar-g assigned EugeneOne1 and unassigned ainar-g Jun 11, 2021
adguard pushed a commit that referenced this issue Jun 15, 2021
Updates #2280.

Squashed commit of the following:

commit d8c6aac
Merge: 84df492 12f1e4e
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 17:21:41 2021 +0300

    Merge branch 'master' into 2280-dns-timeout

commit 84df492
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 16:49:41 2021 +0300

    home: fix docs & naming

commit af44a86
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:55:12 2021 +0300

    all: imp docs & tests

commit 6ed6599
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:26:22 2021 +0300

    home: imp duration tests

commit 8fe7cb0
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:04:16 2021 +0300

    all: imp code, docs & tests

commit a989e8a
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 19:02:23 2021 +0300

    WIP

commit b0362e2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 18:58:09 2021 +0300

    all: imp docs & tests

commit 64b00fd
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 03:44:29 2021 +0300

    home: introduce marshalable duration

commit bfb1a57
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 01:56:10 2021 +0300

    all: add upstream timeout setting
@EugeneOne1
Copy link
Member

@SkyYkb, hello again. Latest builds from edge and beta channels are implementing the new upstream_timeout setting. The reference already available in the wiki. Could you please check if the feature works for you?

@RiverKy
Copy link
Author

RiverKy commented Jun 16, 2021

@EugeneOne1 Thanks for your helpful work.

But it doesn't seem to work fine. According to the wiki, I added upstream_timeout: 2s in section dns in AdGuardHome.yaml with upstream mode Fastest IP address. Then ran sudo ./AdGuardHome -s reload. Nevertheless, with a dead upstream, the time of resolving is still over 10s.
Please tell me if there is something wrong in my configuration.


My version is now at v0.107.0-a.77+6e9a90b9.

@EugeneOne1
Copy link
Member

Unfortunately, the reload command for AdGuard Home running as service doesn't actually reloads the configuration file. This is a known issue, so you should use restart command instead.

If the above wouldn't work, could you please try other upstream modes? Thanks.

@lyaaz
Copy link

lyaaz commented Jun 16, 2021

@SkyYkb, hello again. Latest builds from edge and beta channels are implementing the new upstream_timeout setting. The reference already available in the wiki. Could you please check if the feature works for you?

For me, adguardhome return no response if I use Fastest IP address, so it's Hard to judge whether the setting works.
I have turned to parallel requests a few months ago since some domains are inaccessible without proxy in my country.

@RiverKy
Copy link
Author

RiverKy commented Jun 16, 2021

@EugeneOne1 Works fine for me now. Thanks sincerely.

@QingKongBaiYu I won't get no response with this configuration... I guess that no server could be reached in the time you limited, so AGH wouldn't return a result. Maybe try a longer limit?

@EugeneOne1
Copy link
Member

@SkyYkb, glad to hear that. Thanks for testing. We'll close the issue for now.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#2280.

Squashed commit of the following:

commit d8c6aac
Merge: 84df492 12f1e4e
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 17:21:41 2021 +0300

    Merge branch 'master' into 2280-dns-timeout

commit 84df492
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 16:49:41 2021 +0300

    home: fix docs & naming

commit af44a86
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:55:12 2021 +0300

    all: imp docs & tests

commit 6ed6599
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:26:22 2021 +0300

    home: imp duration tests

commit 8fe7cb0
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Tue Jun 15 15:04:16 2021 +0300

    all: imp code, docs & tests

commit a989e8a
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 19:02:23 2021 +0300

    WIP

commit b0362e2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 18:58:09 2021 +0300

    all: imp docs & tests

commit 64b00fd
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 03:44:29 2021 +0300

    home: introduce marshalable duration

commit bfb1a57
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Sat Jun 12 01:56:10 2021 +0300

    all: add upstream timeout setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants