Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feature: supported to use host name in upstream #522

Merged
merged 11 commits into from
Sep 18, 2019
Merged

feature: supported to use host name in upstream #522

merged 11 commits into from
Sep 18, 2019

Conversation

membphis
Copy link
Member

@membphis membphis commented Sep 16, 2019

will fix: #21

  • doc

@membphis membphis mentioned this pull request Sep 16, 2019
7 tasks
@membphis membphis added this to the ver 0.8 milestone Sep 17, 2019
@membphis membphis changed the title feature: supported to config resolver in yaml config file. feature: supported to use host name in upstream Sep 17, 2019
@moonming moonming changed the title feature: supported to use host name in upstream [WIP] feature: supported to use host name in upstream Sep 18, 2019
@membphis membphis changed the title [WIP] feature: supported to use host name in upstream feature: supported to use host name in upstream Sep 18, 2019
@membphis membphis merged commit 894fa58 into apache:master Sep 18, 2019
@@ -29,6 +29,10 @@ apisix:
# udp: # UDP proxy port list
# - 9200
# - 9211
dns_resolver: # use 114.114.114.114 as default DNS resolver, disable IPv6 and enable local DNS.
- 114.114.114.114
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

114.114.114.114 is only friendly for Chinese. I think 8.8.8.8 or 1.1.1.1 is better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the international lover feel that it is wrong, we modify it better.

@@ -38,7 +38,7 @@ http {

lua_socket_log_errors off;

resolver ipv6=off local=on;
resolver 114.114.114.114 ipv6=off local=on;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

local host, port = core.utils.parse_addr(addr)
if not ipmatcher.parse_ipv4(host) and
not ipmatcher.parse_ipv6(host) then
local ip_info = core.utils.dns_parse(dns_resolver, host)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not drop the error msg of dns_parse. if the domain is invalid or timeout, what's the result? we should add test cases for that.

@moonming
Copy link
Member

@membphis please take a look comments.

@membphis
Copy link
Member Author

@membphis please take a look comments.

you'd better create new issue if you leave new message when we merged some PR already.

@moonming
Copy link
Member

moonming commented Sep 23, 2019 via email

@membphis
Copy link
Member Author

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

balancer: support domain.
2 participants