-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: support SRV record #3686
feat: support SRV record #3686
Conversation
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
log.info("dns resolve SRV ", answer.target, ", result: ", | ||
json.delay_encode(resolved)) | ||
|
||
local weight = answer.weight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the explantation to treat zero weight record to 1
https://github.com/apache/apisix/blob/3af2175629f727d0374b7f77dbdc3a510cf44d81/docs/en/latest/dns.md#srv-record, can also add here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apisix/core/dns/client.lua
Outdated
|
||
-- find the least common multiple of the counts | ||
local lcm = answer_to_count[answers[1]] | ||
for i = 1, #answers do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can iterate from i = 2
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved
docs/en/latest/dns.md
Outdated
{ | ||
"id": 1, | ||
"type": "roundrobin", | ||
"nodes": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use [
here, it an array object here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@membphis
Solved.
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Signed-off-by: spacewander spacewanderlzx@gmail.com
What this PR does / why we need it:
Pre-submission checklist: