AWSのDNSスロットリングの対応

overview

  • AWSDNS サーバへのパケット数の上限は、1 ENI あたり 1024 パケット/秒
  • DNSキャッシュ(dnsmasq)を導入して対応した。

aws.amazon.com

上記の事象に遭遇したため忘備録です。

ドキュメントにも

DNS quotas Each EC2 instance limits the number of packets that can be sent to the Amazon Route 53 Resolver (specifically the .2 address, such as 10.0.0.2) to a maximum of 1024 packets per second per network interface. This quota cannot be increased. The number of DNS queries per second supported by the Amazon Route 53 Resolver varies by the type of query, the size of response, and the protocol in use. For more information and recommendations for a scalable DNS architecture, see the Hybrid Cloud DNS Solutions for Amazon VPC whitepaper.

1 ENI あたり 1024 パケット/秒 と記述がある。

aws.amazon.com

そのため、dnsmasq を利用し、(ネットワーク経由で DNSゾルバーを利用せずに)ローカルキャッシュ(ttl=60s)を利用して応答するように対応した。