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

Use the Additional section of SRV queries instead of doing extra requests #366

Closed
Esya opened this issue Oct 8, 2015 · 1 comment
Closed

Comments

@Esya
Copy link

Esya commented Oct 8, 2015

It seems like kamailio when using SRV records does not read and use the ADDITIONAL SECTION, and instead sends another DNS request to get the IP for the host, which is inefficient and could be supported just like mentioned in the RFC 2782 :

For each element in the new list

  query the DNS for address records for the Target or
  use any such records found in the Additional Data
  section of the earlier SRV response.

Example, for our _sip._udp service using our service discovery tool :

;; ANSWER SECTION:
_sip._udp.service.consul. 15  IN  SRV 1 1 5063 ourserver.node.us.consul.
_sip._udp.service.consul. 15  IN  SRV 1 1 5060 ourserver.node.us.consul.
_sip._udp.service.consul. 15  IN  SRV 1 1 5062 ourserver.node.us.consul.
_sip._udp.service.consul. 15  IN  SRV 1 1 5061 ourserver.node.us.consul.

;; ADDITIONAL SECTION:
ourserver.node.us.consul. 15 IN A 98.XXX.XXX.XXX

It has all the information it needs but it still does an extra request. Any thoughts?

@Esya
Copy link
Author

Esya commented Oct 13, 2015

It turns out that with dns_cache_init set to off it didn't work but removing this line from the configuration it now does not do additional requests.

@Esya Esya closed this as completed Oct 13, 2015
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

1 participant