jburgoos opened a new issue, #13082:
URL: https://github.com/apache/apisix/issues/13082
### 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:
<img width="769" height="494" alt="Image"
src="https://github.com/user-attachments/assets/baeffceb-58f8-4f76-a4bc-c334b9d2f048"
/>
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 -V` or `nginx -V`):
openresty/1.21.4.2
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]