AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Get fastest IP address in background

Open fonlan opened this issue 3 years ago • 2 comments

Problem Description

Currently if enable "Fastest IP address" function it will slow down the query speed.

Proposed Solution

My suggestion is when the query domain was not in cache, query it from upstream and return all without speedtest. After this domain save to cache, ADH can use some background thread to test the fastest IP and modify the cache. Only keep the fastest one. Next time when this query is return from cache ADH can return the fastest one directly.

This solution can bring "Fastest IP addresss" function without additional query delay.

fonlan avatar Oct 08 '21 09:10 fonlan

It's a good idea, is a way to get the best of both worlds

lordraiden avatar Feb 04 '22 21:02 lordraiden

It can also be improved a little, and the fastest returned DNS resolution replies to the client first.

supply9243 avatar Nov 04 '22 04:11 supply9243