Route 53 Configuration - Which is better ALIAS A or ALIAS CNAME RRS

纵饮孤独 提交于 2019-12-25 18:39:08

问题


Question:

When configuring Route 53 with AWS services such as CloudFront or ELB, which is better to use: an ALIAS A record or an ALIAS CNAME record?

Background:

An interesting thread developed on this question regarding the benefits of ALIAS records.

Thread Link

My intention is to create this question so that informed answers and knowledge can be collected in one place.


回答1:


There is no "better," there's only one correct answer: the Alias RR type must be the same as the target RR. For CloudFront, S3, ELB, etc., an Alias of type CNAME is not sensible, since the target is not a CNAME, it's an A.

But if the question is a choice between A alias=yes and CNAME alias=no, then A alias=yes is still the better solution.

The assertion at the other question is that Alias records are equivalent to CNAMEs but intended for the zone apex only is incorrect on both counts.

Alias A records cause ultimate behavior similar to CNAME behavior but they are preferred because they cut the DNS resolution time approximately in half by requiring only one resolver action, instead of two, and because they reduce your per-query cost to 0 when the alias target is an AWS service.




回答2:


Both will work, But you are going to want to use ALIAS. ALIAS is better due to the cost.

Queries to Alias records that are mapped to Elastic Load Balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, and Amazon S3 website buckets are free.

CNAME lookups have a cost associated with them.($0.400 per million queries).

ALIAS also have automation behind them, Any changes to ELB done by AWS will propagate them to your DNS.



来源:https://stackoverflow.com/questions/47186999/route-53-configuration-which-is-better-alias-a-or-alias-cname-rrs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!