Many Envoy components resolve DNS: different cluster types (
the dynamic forward proxy system (which is
composed of a cluster and a filter);
the udp dns filter, etc.
Envoy uses c-ares as a third party DNS resolution library.
On Apple OSes Envoy additionally offers resolution using Apple specific APIs via the
envoy.restart_features.use_apple_api_for_dns_lookups runtime feature.
Envoy provides DNS resolution through extensions, and contains 2 built-in extensions:
For an example of a built-in DNS typed configuration see the HTTP filter configuration documentation.
The Apple-based DNS Resolver emits the following stats rooted in the
dns.apple stats tree:
Number of failed attempts to connect to the DNS server
Number of general failures when calling GetAddrInfo API
Number of failures due to network connectivity
Number of failures when processing data from the DNS server
Number of failed attempts to obtain a file descriptor to the socket to the DNS server
Number of queries that resulted in a timeout