[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #56052] change the DNS server query strategy from sequ
From: |
Gao Qingshui |
Subject: |
[lwip-devel] [bug #56052] change the DNS server query strategy from sequential to Round Robin |
Date: |
Tue, 2 Apr 2019 05:18:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 |
URL:
<https://savannah.nongnu.org/bugs/?56052>
Summary: change the DNS server query strategy from sequential
to Round Robin
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: kevingao
Submitted on: Tue 02 Apr 2019 09:18:07 AM UTC
Category: DNS
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
currently the DNS server query strategy was sequential, it means that lwip
would query the 1st server DNS_MAX_RETRIES times before switching to the
backup one. In the scenario that the main DNS server was unavailable, but the
backup was available, this query stratedy would cusume much time to complete
one successful domain name resolution.
I suggest the DNS query stradegy changed to Round Robin. so the query
procedure was changed from "A->A->A->A->B->B->B->B" to
"A->B->A->B->A->B->A->B", A and B was the main and backup DNS server. In
current settings, this change could make the domain name resolution time from
6s to 1s in above scenario.
The attached file was my modification, pls have a review. There was four
changes:
1, change the DNS query strategy from sequential to Round Robin;
2, for one successful DNS query, record the current server index to make the
next DNS query start from this index, this would save more time if many domain
name resolution happened in above case.
3, reset the current server index to the 1st valid one if servers changed.
4, change the initail DNS timeout from 1s to 2s. This could make the 1st
timeout value was [1s, 2s]. If the initial timeout was set to 1s, the actually
timeout value was [0, 1s], this could incur some unnecessary DNS query
retransmission.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 02 Apr 2019 09:18:07 AM UTC Name:
lwip-dns-change-to-Round-Robin-Query-Strategy.patch Size: 6KiB By: kevingao
<http://savannah.nongnu.org/bugs/download.php?file_id=46695>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?56052>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #56052] change the DNS server query strategy from sequential to Round Robin,
Gao Qingshui <=