feat: support configuring the order of the upstream dns service discovery resolve#7935
Merged
spacewander merged 8 commits intoSep 26, 2022
Conversation
tokers
reviewed
Sep 19, 2022
tokers
left a comment
Contributor
There was a problem hiding this comment.
@monkeyDluffy6017 We should also update the https://apisix.apache.org/docs/apisix/discovery/dns/#service-discovery-via-dns.
spacewander
reviewed
Sep 19, 2022
| uniqueItems = true, | ||
| items = { | ||
| enum = {"last", "SRV", "A", "AAAA", "CNAME"}, | ||
| -- ["not"] = { |
| servers: | ||
| - "127.0.0.1:1053" | ||
| order: | ||
| - A |
Member
There was a problem hiding this comment.
Is it possible to add some test about invalid input, like a or repeated record type?
| id: 1 | ||
| --- must_die | ||
| --- error_log | ||
| matches none of the enum values |
Member
There was a problem hiding this comment.
Can we add a test case: DNS Server returns SRV records first for the same domain name, and the next query returns A records?
juststillthinking
requested review from
spacewander and
tzssangglass
and removed request for
spacewander
September 26, 2022 05:46
Contributor
Author
|
Done |
spacewander
approved these changes
Sep 26, 2022
membphis
approved these changes
Sep 26, 2022
tzssangglass
approved these changes
Sep 26, 2022
Liu-Junlin
pushed a commit
to Liu-Junlin/apisix
that referenced
this pull request
Nov 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…very resolve
Description
Some users are having problems with the upstream DNS service discovery feature, because the current DNS resolution order is fixed: 1. "last" 2. "SRV" 3. "A" 4. "AAAA" 5. "CNAME".
"last" means the last successful resolving method; that is, if the last resolving is successful, the last resolving method will be used first.
This causes the problem that if for some reason the A record is resolved successfully, the higher priority SRV record will not be resolved in the future, and the user expects to get the result of resolving the SRV record.
As a user, I want to configure how and in what order the upstream DNS service discovery function resolves, and APISIX is able to resolve in the way and in the order I configure.
Checklist