Skip to content

Add additional recommended records to PTR responses#184

Merged
jstasiak merged 2 commits into
python-zeroconf:masterfrom
inwotep:master
Aug 8, 2019
Merged

Add additional recommended records to PTR responses#184
jstasiak merged 2 commits into
python-zeroconf:masterfrom
inwotep:master

Conversation

@inwotep
Copy link
Copy Markdown

@inwotep inwotep commented Aug 6, 2019

RFC6763 indicates a server should include the SRV/TXT/A/AAAA records
when responding to a PTR record request. This optimization ensures
the client doesn't have to then query for these additional records.

It has been observed that when multiple Windows 10 machines are monitoring
for the same service, this unoptimized response to the PTR record
request can cause extremely high CPU usage in both the DHCP Client
& Device Association service (I suspect due to all clients having to
then sending/receiving the additional queries/responses).

RFC6763 indicates a server should include the SRV/TXT/A/AAAA records
when responding to a PTR record request.  This optimization ensures
the client doesn't have to then query for these additional records.

It has been observed that when multiple Windows 10 machines are monitoring
for the same service, this unoptimized response to the PTR record
request can cause extremely high CPU usage in both the DHCP Client
& Device Association service (I suspect due to all clients having to
then sending/receiving the additional queries/responses).
@jstasiak
Copy link
Copy Markdown
Collaborator

jstasiak commented Aug 6, 2019

This seems like a sensible thing to do, thank you for the patch. Would you mind writing a test for this behavior?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 91.159% when pulling a7b2cf1 on inwotep:master into ceb602c on jstasiak:master.

@inwotep
Copy link
Copy Markdown
Author

inwotep commented Aug 7, 2019

Great. Second patch includes the testcase & a lint fix.

@jstasiak
Copy link
Copy Markdown
Collaborator

jstasiak commented Aug 8, 2019

Awesome, cheers!

@jstasiak jstasiak merged commit ea64265 into python-zeroconf:master Aug 8, 2019
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

Successfully merging this pull request may close these issues.

3 participants