AWS Route 53

ELB does not have pre-defined IPv4 addresses. You reserve to them using a DNS name.

Hosted Zone

A hosted zone is a container for records, and records contain information about how you want to route traffic for a specific domain. There are two types of hosted zones:

  • Public hosted zones contain records that specify how you want to route traffic on the internet.
  • Private hosted zones contain records that specify how you want to route traffic in an Amazon VPC.

DNS Types

SOA Records

The start of authority (SOA) record identifies the base DNS information about the domain. It includes the following elements:

  • The Route 53 name server that created the SOA record
  • The email address of the administrator
  • A serial number that you can optionally increment whenever you update a record in the hosted zone
  • A refresh time in seconds that secondary DNS servers wait before querying the primary DNS server's SOA record to check for changes
  • The retry interval in seconds that a secondary server waits before retrying a failed zone transfer
  • The time in seconds that a secondary server will keep trying to complete a zone transfer.
  • The minimum time to live (TTL)
  • The current version of the data file

A sample of the SOA

ns-2048.awsdns-64.net. hostmaster.example.com. 1 7200 900 1209600 86400

NS Records

Name server records are used by Top Level Domain servers to direct traffic to the content DNS server which contains the authoritative DNS records.

When user request for a domain name, the query goes to the top level domain server. The top level domain server requests the name server records it holds for the start of authority.

Amazon Route 53 automatically creates a name server (NS) record that has the same name as your hosted zone. It lists the four name servers that are the authoritative name servers for your hosted zone.

A (Address) Records

Point a domain name to an IP address.

CNAMES (Canonical Name)

Point a domain name to an alternative domain name.

A CNAME record can redirect DNS queries to any DNS record that might not in the same Route 53 hosted zone.

You can't create a CNAME record that has the same name as the hosted zone (the zone apex). This is true both for hosted zones for domain names (example.com) and for hosted zones for subdomains (zenith.example.com).

Alias Record

Amazon Route 53 alias records provide a Route 53–specific extension to DNS functionality. Alias records let you route traffic to
- CloudFront distributions
- Amazon S3 buckets
- Another record in the same Route 53 hosted zone

Unlike a CNAME record, you can create an alias record at the top node of a DNS namespace, also known as the zone apex.

If an alias record points to an AWS resource, you can't set the time to live (TTL); Route 53 uses the default TTL for the resource.

MX (Mail Exchange) Records

Direct the mail server request under the domain name to a specific IP address.

PTR Records

Time To Live (TTL)

TTL is the length that a DNS record is cached on either the Resolving Server or the users own local PC. The lower the TTL, the faster changes to DNS records take to propagate throughout the internet.

Routing Policy

Simple routing policy

Use for a single resource that performs a given function for your domain.

Cannot related the resources with a health check.

You can't create multiple records that have the same name and type, but you can specify multiple values in the same record, such as multiple IP addresses. If you specify multiple values in a record, Route 53 returns all values to the recursive resolver in random order, and the resolver returns the values to the client. The client then chooses a value and resubmits the query.

Failover routing policy

Use when you want to configure active-passive failover.
Failover routing lets you route traffic to a resource when the resource is healthy or to a different resource when the first resource is unhealthy.

Geolocation routing policy

Use when you want to route traffic based on the location of your users.

You can use geolocation routing to:

  1. localize your content and present some or all of your website in the language of your users. 2. restrict distribution of content to only the locations in which you have distribution rights.
  2. enable each user location to be consistently routed to the same endpoint.

Geolocation works by mapping IP addresses to locations. However, some IP addresses aren't mapped to geographic locations. You can create a default record that handles both queries from IP addresses that aren't mapped to any location and queries that come from locations that you haven't created geolocation records for. If you don't create a default record, Route 53 returns a "no answer" response for queries from those locations.

Geoproximity routing policy

Use when you want to route traffic based on the location of your resources and, optionally, shift traffic from resources in one location to resources in another.

To use geoproximity routing, you must use Route 53 traffic flow.

You can also optionally choose to route more traffic or less to a given resource by specifying a value, known as a bias. A bias expands or shrinks the size of the geographic region from which traffic is routed to a resource.

  • To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
  • To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.

Latency routing policy

Use when you have resources in multiple AWS Regions and you want to route traffic to the Region that provides the best latency with less round-trip time.

To use latency-based routing, you create latency records for your resources in multiple AWS Regions. When Route 53 receives a DNS query for your domain or subdomain, it determines which region gives the user the lowest latency, and then selects a latency record for that region.

Latency between hosts on the internet can change over time as a result of changes in network connectivity and routing.

Data about the latency between users and your resources is based entirely on traffic between users and AWS data centers. If you aren't using resources in an AWS Region, the actual latency between your users and your resources can vary significantly from AWS latency data.

Multivalue answer routing policy

Use when you want Route 53 to respond to DNS queries with up to eight healthy records selected at random. It's not a substitute for a load balancer, but the ability to return multiple health-checkable IP addresses is a way to use DNS to improve availability and load balancing.

To route traffic approximately randomly to multiple resources, such as web servers, you create one multivalue answer record for each resource and, optionally, associate a Route 53 health check with each record.

Note the following:

  • If you associate a health check with a multivalue answer record, Route 53 responds to DNS queries with the corresponding IP address only when the health check is healthy.
  • If you don't associate a health check with a multivalue answer record, Route 53 always considers the record to be healthy.
  • If you have eight or fewer healthy records, Route 53 responds to all DNS queries with all the healthy records.
  • When all records are unhealthy, Route 53 responds to DNS queries with up to eight unhealthy records.

Weighted routing policy

Use to route traffic to multiple resources in proportions that you specify.

To configure weighted routing, you create records that have the same name and type for each of your resources. You assign each record a relative weight that corresponds with how much traffic you want to send to each resource. Amazon Route 53 sends traffic to a resource based on the weight that you assign to the record as a proportion of the total weight for all records in the group.

This can be useful for a variety of purposes, including load balancing and testing new versions of software.

EDNS0

To improve the accuracy of geolocation, geoproximity, and latency routing, Amazon Route 53 supports the edns-client-subnet extension of EDNS0.

When a browser or other viewer uses a DNS resolver that does not support edns-client-subnet, Route 53 uses the source IP address of the DNS resolver to approximate the location of the user. When a browser or other viewer uses a DNS resolver that does support edns-client-subnet, the DNS resolver sends Route 53 a truncated version of the user's IP address. Route 53 determines the location of the user based on the truncated IP address rather than the source IP address of the DNS resolver. This typically provides a more accurate estimate of the user's location.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章