Amazon Route 53もEDNS-Client-Subnetをサポートしているようだ

2014.04.03

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

ども、大瀧です。
先ほど佐々木よりCloudFrontがEDNS-Client-Subnetをサポートしたので試してみたというエントリーが投下されましたが、同じエッジロケーションでサービスされるAmazon Route 53も動くのでは?と思い試してみました。

Route 53レイテンシーベースルーティングの設定

Route 53には、最寄りのリージョンのレコードを返すレイテンシーベースルーティング(LBR)という機能があります。以下のような感じで設定してみました。

route53edns01

route53edns02

動作確認

では、弊社(日本国内)のISPのリゾルバとGoogle DNS(8.8.8.8)でどうなるかと米国リージョンのEC2からAWSのリゾルバ、Google DNSでの実行結果を比較してみます。

日本からのアクセス

ikkomon:~ ryuta$ host -t cname about.otaki.classmethod.info.
about.otaki.classmethod.info is an alias for about-ap-northeast-1.otaki.classmethod.info.
ikkomon:~ ryuta$ host -t cname about.otaki.classmethod.info. 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

about.otaki.classmethod.info is an alias for about-ap-northeast-1.otaki.classmethod.info.

米国からのアクセス

[ec2-user@ip-10-117-66-61 ~]$ host -t cname about.otaki.classmethod.info.
about.otaki.classmethod.info is an alias for about-us-east-1.otaki.classmethod.info.
[ec2-user@ip-10-117-66-61 ~]$ host -t cname about.otaki.classmethod.info. 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

about.otaki.classmethod.info is an alias for about-us-east-1.otaki.classmethod.info.
[ec2-user@ip-10-117-66-61 ~]$

それぞれ、Google DNS経由でも最寄りのリージョンのレコードが返ってきていますね!

まとめ

元々対応していたのか、今回のCloudFrontに合わせて対応するようになったのかはわかりませんが、賢くクライアントを判別できるRoute 53およびCloudFrontにメロメロです!