help with libuv support
Hello,
While testing async mode with python binding (async-get-ip.py), it clearly becomes apparent that the script does not scale well. For 100 domains, some requests fall in timeout. For 500 (see examples/samples.txt), all of them fall in timeout.
./examples/async-get-ip.py $(cat examples/samples.txt|xargs)
As stated in getdns issue 257, one of the possible cause is that the provided loop should be avoided, and an external event loop should be used: issuecomment-276311860
Hence this draft pull request. Which implements an "getdns.UVContext" subtype, to build with the following command:
python ./setup.py build --with-ext-uv
However, much to our dismay, the performances are equally .... not satisfying. The same test with 500 domains ends up with every requests falling in timeout, again.
./examples/async-uv-get-ip.py $(cat examples/samples.txt|xargs)
So the question is, what exactly are we doing wrong? Is there a way to add queries to a context and have the underlying event loop resolve them without ending up in timeout? Our goal is to have a python script testing then of thousands of domains continuesly, as part of a monitoring tool.
Many thanks for any help you could provide...
Regards, CERT-XML
Happy New Year, and thanks for adding the libuv event loop! I'll review it tonight after I'm done with $DAYJOB.
TBH it's been a couple of years since I've looked at this closely and fortunately Python profiling tools have improved over that time, so I think we're in better shape to track down problems in the module. That said, I'm not that optimistic about being able to isolate the problem to the getdns code, given the findings in this paper. However, you've inspired me to start digging into it again.
Thanks again, and I'll keep you posted.