Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS lookup happening on every log message (UDP) #51

Open
bmerry opened this issue Mar 29, 2022 · 2 comments
Open

DNS lookup happening on every log message (UDP) #51

bmerry opened this issue Mar 29, 2022 · 2 comments

Comments

@bmerry
Copy link
Contributor

bmerry commented Mar 29, 2022

When using GelfUdpHandler with a hostname (rather than an IP address) as a destination, it gets resolved by DNS on every log message, which is a big performance concern. This is behaviour inherited from Python's DatagramHandler (see https://bugs.python.org/issue47149), but presumably pygelf could work around it by resolving the hostname itself on startup.

bmerry added a commit to ska-sa/katsdpservices that referenced this issue Mar 29, 2022
This works around https://bugs.python.org/issue47149 and
keeprocking/pygelf#51 to avoid doing DNS
lookups on every log message.
@keeprocking
Copy link
Owner

Thanks, I'll look into this.

@bmerry
Copy link
Contributor Author

bmerry commented Mar 30, 2022

There is some interesting discussion happening on the bpo bug mentioned above regarding handling DNS TTL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants