[issue47149] DatagramHandler doing DNS lookup on every log message
Bruce Merry
report at bugs.python.org
Tue Mar 29 13:49:35 EDT 2022
Bruce Merry <bmerry at gmail.com> added the comment:
> If you don’t look it up every time, how do you deal with DNS timeouts?
Do you mean expiring the IP address when the TTL is reached? I suppose that could be an issue for a long-running service, and I don't have a good answer to that. Possibly these days with services meshes and load-balancers it is less of a concern since a logging server can move without changing its IP address.
But it's important for a logging system not to block the service doing the logging (which is one reason for using UDP in the first place). I only discovered this issue because of some flaky DNS servers that would occasionally take several seconds to answer a query, and block the whole asyncio event loop while it waited.
At a minimum it would be useful to document it, so that you know it's something to be concerned about when using DatagramHandler.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47149>
_______________________________________
More information about the Python-bugs-list
mailing list