-
Couldn't load subscription status.
- Fork 127
Description
Issue by panagiotious
Saturday Feb 13, 2016 at 18:51 GMT
Originally opened as getdnsapi/getdns-python-bindings#39
Hello,
After spending a several hours debugging, rewriting and implementing a few ideas, I think I can safely conclude that the asynchronous functionality is not scaling. When items are added to the Context object as calls for address, the timeout counter starts; that's devastating! When resolving a handful of domains and not care about precision, it is not an issue, but when the resolution requests are of the order of millions, it is impossible to scale.
In the trivial case, resolving 10,000 domain names, ends up with a few hundreds timing out. The more QNAMEs added, the highest the timeout events. Here is a small example:
In [44]: ctx = getdns.Context()
In [45]: ctx.resolution_type = getdns.RESOLUTION_STUB
In [46]: ctx.upstream_recursive_servers = [{'address_data': '8.8.8.8', 'address_type': 'IPv4'}]
In [47]: ctx.suffix = []
In [48]: ctx.timeout = 10000
In [49]: ctx.address(name='www.google.com', extensions={}, callback='cbk', userarg='www.google.com')
Out[49]: -2897608153477377669
In [50]: time.sleep(10)
In [51]: ctx.run()
Query timed out for www.google.com