Comments (5)
Interesting observation. I remember that I've put in AI_ADDRCONFIG for some specific reason, but I cannot remember what it was.
Will have to dig it out.
Günter
Günter Obiltschnig
Applied Informatics Software Engineering GmbH
A-9182 Maria Elend | Maria Elend 96/4 | www.appinf.com
P: +43 4253 32596 M: +43 676 5166737 F: +43 4253 32096
Company Registration: FN 276491 f | Landesgericht Klagenfurt
Managing Director: DI Günter Obiltschnig
On 18.01.2013, at 19:48, karlr42 wrote:
I've found that for some domains, resolving takes on the order of 5 seconds in my environment. This is evident using HTTPSClientSession and I've put together a minimal test case here:
https://gist.github.com/4566844
From my testing it looks like the issue is IPv6 related and is down to the AI_ADDRCONFIG flag passed to the getaddrinfo system call by DNS::hostByAddress. If I remove that flag and recompile the library(I'm using 1.4.6 downloaded from the main site) and then try my test case, resolution takes the normal(<1 sec) amount of time. I have also replicated the problem and made a small test case using just C and directly calling getaddrinfo. : https://gist.github.com/4566462
My setup is:
Ubuntu 12.10 64-bit
Configured Poco(1.4.6) with --no-tests --no-samples --omit=Data/OBDC,Data/MySQL
My ifconfig is : https://gist.github.com/4566285 and the interface connected to the outside world is eth1.I think the issue is down to the fact the domain in question has no AAAA records but my local machine has an assigned IPv6 address. So getaddrinfo, following the AI_ADDRCONFIG flag, makes a request an AAAA record, which timesout, and then makes a request for an A record, thus causing the delay. Or there is some other peculiarity with the DNS records for this site and others I've tried(myjoyonline.com, for example), I'm not sure.
So maybe this isn't necessarily a bug on your side, but I thought I would bring it to your attention anyway- this issue doesn't seem to affect any other application I use in this environment. I have patched Net::DNS::hostByAddress locally for now to remove the AI_ADDRCONFIG flag and my application(a proxy server making lots of DNS requests) is a lot faster now.
—
Reply to this email directly or view it on GitHub.
from poco.
Maybe expose it in hostByName() and hostByAddress(), with default AI_CANONNAME | AI_ADDRCONFIG ?
On another note, FYI apparently something has changed in appinf DNS and test fails now. Not a big deal, just little bit annoying.
from poco.
apparently something has changed in appinf DNS and test fails now
There was 1 failure: 1: N7CppUnit10TestCallerI7DNSTestEE.testHostByName "he1.name() == "dnstest.appinf.com" || he1.name() == "aliastest.appinf.com"" in "src/DNSTest.cpp", line 64
from poco.
I fixed the DNS records for dnstest and aliastest and the test should work again soon (after the change propagates through).
Günter
Günter Obiltschnig
Applied Informatics Software Engineering GmbH
A-9182 Maria Elend | Maria Elend 96/4 | www.appinf.com
P: +43 4253 32596 M: +43 676 5166737 F: +43 4253 32096
Company Registration: FN 276491 f | Landesgericht Klagenfurt
Managing Director: DI Günter Obiltschnig
On 25.01.2013, at 06:43, Aleksandar Fabijanic wrote:
apparently something has changed in appinf DNS and test fails now
There was 1 failure:
1: N7CppUnit10TestCallerI7DNSTestEE.testHostByName
"he1.name() == "dnstest.appinf.com" || he1.name() == "aliastest.appinf.com""
in "src/DNSTest.cpp", line 64—
Reply to this email directly or view it on GitHub.
from poco.
I could not reproduce this problem with my DNS, Windows 8, VS 2012. Flags can now be passed by user, if not explicitly passed, defaulting to AI_CANONNAME | AI_ADDRCONFIG. Will be in 1.5.2
from poco.
Related Issues (20)
- GitHub runner: Linux thread sanitizer tests fail with "unexpected memory mapping"
- ODBC Unicode wrappers do not check for null length pointers
- On Poco::Buffer<char> deallocation, free(): invalid next size (normal) HOT 2
- FAILED: bin/libPocoActiveRecord.dll lib/libPocoActiveRecord.dll.a HOT 1
- Upgrade bundled SQLite to 3.45.2
- HTTP cookie specification update HOT 2
- why ini file don't support write, is it difficult? HOT 1
- Checksum mismatch for release 1.13.3 HOT 6
- Issue with Websocket+TLS in Poco 1.13.3 HOT 7
- RecordSet issue since 1.10.0
- SocketStream messages doesn't send, and send after close socket.
- SQLChannel stops logging on LoggingSubsystem shutdown HOT 1
- Build Error in gcc 8 with POCO 1.13.0 Release. HOT 3
- decodeWord adds spaces at folding borders, when there are special characters encoded
- Serializable Isolation level for SQLite Databases HOT 2
- Socket::available Causes Connection Reset by Peer on Windows UDP Sockets HOT 3
- SetSourceIP Error
- Postgres CMakeList.txt HOT 1
- Using passive mode, it seems that it has not been converted to data connection
- The load balancing issue in Poco::ActiveThreadPool HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poco.