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

query a not exist record too slow #859

Closed
blue-troy opened this issue Aug 23, 2022 · 0 comments · Fixed by #860
Closed

query a not exist record too slow #859

blue-troy opened this issue Aug 23, 2022 · 0 comments · Fixed by #860
Labels
bug Something isn't working

Comments

@blue-troy
Copy link
Contributor

** if we query a service name like nginx.default.svc.clusterset.local associate a service export, we can quickly get the result. but if a service name ends with svc.clusterset.local which not associate a service export, we will cost lots of time.**:

query a service that not export ,we will get a empty response or NXDomain quickly:

How to reproduce it (as minimally and precisely as possible):

attach into a pod ,then nslookup xxx.default.svc.clusterset.local .if we tcpdump the traffic between pod and coredns,we will see the log below:

13:53:40.532548 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 148: 10.20.144.27.12626 > 10.243.38.189.53: 4345+ A? xxx.default.svc.clusterset.local. (106)
13:53:42.532924 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 59: 10.20.144.27.51308 > 10.243.38.189.53: 47653+ NS? . (17)
13:53:42.532925 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 148: 10.20.144.27.1798 > 10.243.38.189.53: 4345+ A? xxx.default.svc.clusterset.local. (106)
13:53:42.533094 c2:0b:32:92:ba:c2 > ee:ee:ee:ee:ee:ee, ethertype IPv4 (0x0800), length 59: 10.243.38.189.53 > 10.20.144.27.51308: 47653 Refused- 0/0/0 (17)
13:53:47.530687 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 148: 10.20.144.27.54031 > 10.243.38.189.53: 4345+ A? xxx.default.svc.clusterset.local. (106)
13:53:47.530713 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 59: 10.20.144.27.62748 > 10.243.38.189.53: 42075+ NS? . (17)
13:53:47.530882 c2:0b:32:92:ba:c2 > ee:ee:ee:ee:ee:ee, ethertype IPv4 (0x0800), length 59: 10.243.38.189.53 > 10.20.144.27.62748: 42075 Refused- 0/0/0 (17)
13:53:51.531340 ee:ee:ee:ee:ee:ee > c2:0b:32:92:ba:c2, ethertype IPv4 (0x0800), length 59: 10.20.144.27.53267 > 10.243.38.189.53: 15764+ NS? . (17)
13:53:51.531520 c2:0b:32:92:ba:c2 > ee:ee:ee:ee:ee:ee, ethertype IPv4 (0x0800), length 59: 10.243.38.189.53 > 10.20.144.27.53267: 15764 Refused- 0/0/0 (17)

the total time will cost about ten seconds.

Anything else we need to know?:

Environment: submariber 0.12.1

  • Diagnose information (use subctl diagnose all):
  • Gather information (use subctl gather):
  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:
@blue-troy blue-troy added the bug Something isn't working label Aug 23, 2022
blue-troy added a commit to blue-troy/lighthouse that referenced this issue Aug 29, 2022
Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes submariner-io#859
Signed-off-by: blue-troy <[email protected]>
aswinsuryan pushed a commit that referenced this issue Aug 31, 2022
)

Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes #859
Signed-off-by: blue-troy <[email protected]>
aswinsuryan pushed a commit to aswinsuryan/lighthouse that referenced this issue Nov 29, 2022
Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes submariner-io#859
Signed-off-by: blue-troy <[email protected]>
aswinsuryan pushed a commit to aswinsuryan/lighthouse that referenced this issue Nov 29, 2022
Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes submariner-io#859
Signed-off-by: blue-troy <[email protected]>
aswinsuryan added a commit that referenced this issue Nov 29, 2022
)

Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes #859
Signed-off-by: blue-troy <[email protected]>

Co-authored-by: blue-troy <[email protected]>
mkolesnik pushed a commit that referenced this issue Dec 13, 2022
Coredns assumes ServeDNS has written the response body unless
the returned code indicates it hasn't been written as determined
by ClientWrite (which is only the codes RcodeServerFailure,
RcodeRefused, RcodeFormatError and RcodeNotImplemented),
in which case it writes the response.

If there's no next plugin, it simply returns the code but if
it isn't one of the ClientWrite codes, then no response is written.

If no response,client will try to resend dns request multiple times,
which causes seconds delay.

Fixes #859
Signed-off-by: blue-troy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant