-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Description
For our system, we are using the DNS resolver provided by APISIX. To do this, we configured the following in the configuration file:
apisix:
node_listen:
- ip: X.X.X.X
port: 10080
enable_ipv6: false
dns_resolver:
- "x.x.x.x"
- "y.y.y.y"
dns_resolver_valid: 30
resolver_timeout: 1
With this configuration, we expected the DNS query timeout to be 1 second. However, it seems that regardless of the value we set, we still observe a DNS timeout of 2 seconds.
It appears that this setting configures the NGINX instance associated with the service, but the DNS resolution is performed earlier within APISIX itself.
While investigating the root cause, we found that the DNS resolution timeout seems to be hardcoded in the source code at the highlighted line (client.lua):
After testing by changing that value (from 2000 to 1000) and running systemctl reload apisix, we observed that the DNS resolution timeout then becomes 1 second, which is what we expected.
Is there any way to configure this timeout without modifying the source code? If not, is there any plan to make these values configurable in the future?
Environment
- APISIX version (run
apisix version): 3.8.0 - Operating system (run
uname -a): debian 11 - OpenResty / Nginx version (run
openresty -Vornginx -V): openresty/1.21.4.2
Metadata
Metadata
Assignees
Labels
Type
Projects
Status