nic-6443 commented on issue #10956: URL: https://github.com/apache/apisix/issues/10956#issuecomment-4676893100
The 2s gap in your logs sits exactly across the in-request DNS lookup (between `http_access_phase` and `dns_parse`), so this looks like the configured DNS resolver taking ~2s to answer — typically a timeout-and-retry against a slow or lossy nameserver — rather than APISIX Lua code being slow. When upstream nodes are domain names, APISIX resolves them synchronously in the access phase once the cached record's TTL expires, so any resolver hiccup surfaces directly as request latency. Worth checking the resolvers APISIX picked up (config.yaml / resolv.conf), running a local caching resolver next to APISIX, or setting `apisix.dns_resolver_valid` to pin TTLs; using IP nodes or a discovery module avoids the inline lookup entirely. Recent versions also upgraded the bundled DNS client to lua-resty-dns-client 7.1.0 (#12851, since 3.15.0). Since this is two years old, environment-specific and marked can't-reproduce, I'd suggest closing it — happy to dig in again if anyone can reproduce on a current version with resolver details. -- 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]
