The symptom#
Lookups from a busy host fail intermittently, and only at peak:
- glibc applications log
Temporary failure in name resolutionafter the full resolver timeout, typically five or ten seconds. Reading getaddrinfo errors - CoreDNS on an EKS node logs timeouts forwarding to the VPC resolver, while CoreDNS replicas on other nodes are fine.
- dig against the resolver from the same host times out a few times in a hundred, then answers instantly.
The same picture comes from three causes. The interface may be over the resolver's packet limit. The instance may be over its own packets-per-second or connection-tracking allowance, which drops all traffic, not only DNS. Or the lookups may go to a custom resolver that is itself overloaded. ENA counters separate the first two from each other, and the resolver address separates the third.
What the limit covers#
AWS documents a 1024 packets-per-second limit to services that use link-local addresses. It counts the aggregate of Route 53 Resolver DNS queries, Instance Metadata Service (IMDS) requests, Amazon Time Sync NTP requests and Windows licensing requests, and it cannot be increased. The number of DNS queries per second the resolver supports also varies with the query type, the response size and the protocol. Amazon DNS server quotas
The resolver is reachable at 169.254.169.253, at fd00:ec2::253 for IPv6, and at the base of the VPC's primary IPv4 range plus two, such as 10.0.0.2. All of these are the same service and share the same budget. Amazon DNS server
Because IMDS counts too, an application that fetches credentials or instance metadata on every request spends the same allowance its DNS lookups need. So does a search list: each external lookup from a Kubernetes pod with ndots:5 can become many queries before the real one is sent. Kubernetes ndots and external lookups
Read the ENA counters#
On instances with the ENA driver, ethtool -S prints per-interface allowance counters. linklocal_allowance_exceeded is the number of packets dropped because the packets per second to local proxy services exceeded the maximum for the network interface. AWS states it affects traffic to the Amazon DNS service, IMDS and the Time Sync Service, and does not affect traffic to custom DNS resolvers. ENA network performance metrics
# On the EC2 instance, for each interface that carries the traffic
ethtool -S eth0 | grep -E 'allowance_exceeded|conntrack_allowance_available'
# The counters are cumulative since the driver loaded; sample twice
ethtool -S eth0 | grep linklocal_allowance_exceeded; sleep 60; ethtool -S eth0 | grep linklocal_allowance_exceeded
The counters only increase, so a non-zero value on its own says little about today. Read them twice a minute apart during the failure window. The same output includes pps_allowance_exceeded and conntrack_allowance_exceeded, which cover the instance's overall packet rate and tracked connections. To keep a history, the CloudWatch agent can publish these ENA metrics. ENA network performance metrics
Then confirm where lookups go. The resolver addresses above are the Amazon DNS service; anything else in resolv.conf is a custom resolver this limit does not cover.
cat /etc/resolv.conf
The counter is read on the instance, so it needs a shell on the EC2 host. Where you have none, you cannot read it, and the decision rests on query timing and resolver logs alone.
Read the result#
| Counter that rises during failures | Lookups go to | Points to |
|---|---|---|
linklocal_allowance_exceeded | Amazon DNS | This interface is over the link-local packet limit |
pps_allowance_exceeded or conntrack_allowance_exceeded | Any | The instance's own network allowance, all traffic affected |
| None | Amazon DNS | Not this limit; look at the resolver path and the zone |
| None | Custom resolver | The custom resolver or the path to it |
When the first row holds, find who sends the packets. On a Kubernetes node, CoreDNS replicas forward the whole cluster's misses through the interfaces of the few nodes they run on. On a plain instance, count lookups per process, and include IMDS calls.
Reducing the packet rate#
These are changes, and each moves load rather than removing a limit:
- Cache answers close to the client: a local caching resolver on the instance, or NodeLocal DNSCache on Kubernetes nodes, answers repeats without sending a packet to the VPC resolver. NodeLocal DNSCache
- Shrink query fan-out: fully qualified names, a lower
ndots, and fewer AAAA lookups where the service has no IPv6 path. - Spread forwarding: more CoreDNS replicas on more nodes, so no single interface carries the cluster's queries.
- Cache IMDS results, such as credentials, in the application or SDK instead of fetching them per request.
A worked example#
This example is illustrative. An EKS cluster in account 111122223333 runs two CoreDNS replicas, both on node ip-10-0-12-34. From 18:00 UTC, checkout pods log lookups of payments.example.com that take five seconds and then fail, about two percent of them.
On ip-10-0-12-34, linklocal_allowance_exceeded rises from 1,204,500 to 1,229,700 in 60 seconds: 25,200 dropped packets, about 420 a second. pps_allowance_exceeded does not move. On a node without CoreDNS, linklocal_allowance_exceeded stays flat. CoreDNS's forward metrics show about 1,400 queries a second to 10.0.0.2. Both replicas push their upstream traffic through the same node's interfaces, and the drops match the failed lookups. The payments API and the zone are not involved.
In the same cluster a week later, the same symptom appears, but linklocal_allowance_exceeded is flat on every node and pps_allowance_exceeded rises on one node running a batch job. That node drops packets of every kind, DNS included. The fix is in instance sizing or the batch job, not DNS.
Limits#
The counter does not say which process sent the dropped packets, and it mixes DNS with IMDS and NTP. Attribute the traffic separately, for example from CoreDNS metrics or by counting the application's lookups.
VPC Flow Logs do not record traffic to the Amazon DNS server, so they cannot show this traffic either. Flow log limitations
The limit is per network interface, and an instance can have several. Read the counters on the interface that carries the DNS traffic. For the wider method of splitting a dependency failure from a release, see runtime dependency failures.
Questions#
Can the 1024 packets per second limit be raised?
No. AWS documents it as a quota that cannot be increased. Reduce the packet rate per interface with caching, fewer queries, or more interfaces sharing the load.
Does the limit apply to a custom DNS server in the VPC?
No. The ENA documentation states that linklocal_allowance_exceeded does not affect traffic to custom DNS resolvers. The custom resolver may forward to the Amazon DNS server itself, though, and then its own interface is subject to the limit.
Do instance metadata calls count against the same limit?
Yes. The limit covers the aggregate of Route 53 Resolver DNS queries, IMDS requests, Amazon Time Sync NTP requests and Windows licensing requests from the interface.