Skip to content
Pablo Rodriguez

Route53 High Availability

Using Route 53 to Create Highly Available Environments

Section titled “Using Route 53 to Create Highly Available Environments”

All computers on the Internet—from your smartphone or laptop to the servers that serve content for massive retail websites—find and communicate with one another by using IP addresses. When you open a web browser and go to a website, you don’t have to remember and enter a long number. Instead, you can enter a domain name such as myweb.com and still end up in the right place.

The DNS is a globally distributed service that translates human readable names such as www.myweb.com into the numeric IP addresses such as 192.0.2.1 that computers use to connect to each other:

  • The internet’s DNS works much like a phone book by managing the mapping between names and numbers
  • DNS servers translate requests for names into IP addresses, controlling which server an end user will reach when they enter a domain name into their web browser
  • These requests are called queries

Clients typically do not make queries directly to authoritative DNS services. Instead, clients generally connect to another type of DNS service known as a resolver, or a recursive DNS service:

  • A recursive DNS service doesn’t own any DNS records but acts as an intermediary that can get the DNS information on your behalf
  • If a recursive DNS service has the DNS reference cached or stored for a period of time, then it answers the DNS query by providing the source or IP information
  • If not, it passes the query to one or more authoritative DNS servers to find the information
DNS Web Service

You can implement multi-Region high availability and fault tolerance in your network architecture by using Route 53. Route 53 is a highly available and scalable DNS web service.

You can use Route 53 to perform three main functions in any combination:

  • Domain registration - purchase and manage domain names such as myweb.com, and Route 53 automatically configures DNS settings for your domains
  • DNS routing - connects user requests to infrastructure that runs in AWS such as EC2 instances, ELB load balancers, or S3 buckets. You can also use Route 53 to route users to infrastructure outside AWS
  • Health checking - monitor the health of your resources, such as web servers and email servers

You can create a hosted zone in Route 53:

  • A hosted zone is a container for records, which include information about how you want to route traffic for a domain and all of its subdomains
  • A hosted zone has the same name as the corresponding domain
  • Route 53 provides name servers to form part of the DNS that help to translate domain names into IP addresses

Route 53 perform health checks to monitor the health of your resources:

  • You can configure endpoint health checks or calculated health checks that monitor other health checks
  • You can configure CloudWatch alarm health checks to monitor the status of CloudWatch metrics
  • Amazon Route 53 Application Recovery Controller now offers zonal autoshift, a feature that you can enable to safely and automatically shift your application’s traffic away from an AWS Availability Zone when AWS identifies a potential failure

Route 53 name servers are the authoritative name servers for every domain that uses Route 53 as the DNS service:

  • The name servers know how you want to route traffic for your domain and subdomains based on the records that you created in the hosted zone for the domain
  • Route 53 name servers store the hosted zones for the domains that use Route 53 as the DNS service
  • For example, if a Route 53 name server receives a request for www.myweb.com, it finds that record and returns the IP address, such as 192.0.3.4, that is specified in the record

Route 53 supports multiple types of routing policies, which determine how Route 53 responds to queries:

Simple Routing

Configure standard DNS records with no special Route 53 routing. Typically route traffic to a single resource (for example, to a web server for your website).

Weighted Routing

Associate multiple resources with a single domain name and choose how much traffic is routed to each resource. Useful for load balancing and testing new versions of software.

Latency Routing

If your application is hosted in multiple AWS Regions, improve performance by serving requests from the AWS Region that provides the lowest latency.

Failover Routing

Route traffic to a resource when the resource is healthy or to a different resource when the first resource is unhealthy.

Geoproximity Routing:

  • Gives Route 53 the ability to route traffic to your resources based on the geographic location of your users and your resources
  • You can optionally choose to route more traffic or less traffic 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 use geoproximity routing, you must use Route 53 traffic flow

Geolocation Routing:

  • Choose the resources that serve your traffic based on the geographic location of your users, meaning the location that DNS queries originate from
  • You can localize your content and present some or all of your website in the language of your users
  • You can restrict the distribution of content to only the locations in which you have distribution rights
  • You can specify geographic locations by continent, by country, or by state in the United States

Multivalue Answer Routing:

  • Configure Route 53 to return multiple values, such as IP addresses for your web servers, in response to DNS queries
  • You can specify multiple values for almost any record and check the health of each resource
  • Route 53 returns values for only healthy resources
  • It’s not a substitute for a load balancer, but the ability to return multiple IP addresses that have passed health checks is a way to use DNS to improve availability and load balancing

IP-based Routing:

  • Fine-tune your DNS routing by using your understanding of your network, applications, and clients to make the best DNS routing decisions for your end users
  • Gives you granular control to optimize performance or reduce network costs by uploading your data to Route 53 in the form of user-IP-to-endpoint mappings
  • Offers the ability to optimize routing based on specific knowledge of your customer base

To configure Route 53 to route traffic to your resources, you have to create a public or a private hosted zone:

Used to route internet traffic

  • Create a public hosted zone if you want to route internet traffic to your resources
  • For example, so that your customers can view the company website that you’re hosting on EC2 instances

Next you create records in the hosted zone. Records define where you want to route traffic for each domain name or subdomain name. Some of the most commonly used record types are:

  • A record - route traffic to a resource, such as a web server, by using an IPv4 address
  • AAAA record - route traffic to a resource, such as a web server, by using an IPv6 address in colon-separated hexadecimal format
  • CNAME record - maps DNS queries for the name of the current record to another domain or subdomain
  • MX record - specifies the names of your mail servers and, if you have two or more mail servers, the priority order
  • NS record - identifies the name servers for the hosted zone

Route 53 Resolver automatically answers DNS queries for the following:

  • Local VPC domain names for EC2 instances (for example, ec2-192-0-2-44.compute-1.amazonaws.com)
  • Records in private hosted zones (for example, acme.example.com)
  • Public domain name lookups against public name servers on the internet
Active-Passive Configuration

If you have multiple resources that perform the same function, you can configure DNS failover so that Route 53 will route your traffic from an unhealthy resource to a healthy resource.

Use an active-passive failover configuration when you want a primary resource or group of resources to be available the majority of the time and you want a secondary resource or group of resources to be on standby:

  • When responding to queries, Route 53 includes only the healthy primary resources
  • If all the primary resources are unhealthy, Route 53 begins to include only the healthy secondary resources in response to DNS queries
  • To create an active-passive failover configuration, you create the records and specify failover for the routing policy

Route 53 can check the health of your resources in both simple and complex configurations:

Simple Configurations:

  • You create a group of records that all have the same name and type, such as a group of weighted records with a type of A for example.com
  • You configure Route 53 to check the health of the corresponding resources
  • Route 53 responds to DNS queries based on the health of your resources

Complex Configurations:

  • You create a tree of records that route traffic based on multiple criteria
  • For example, if latency for your users is your most important criterion, then you might use latency alias records to route traffic to the Region that provides the best latency
  • The latency alias records might have weighted records in each Region as the alias target

Route 53 is a DNS service that manages domain name registrations, provides hosted zones and authoritative name servers, and performs DNS routing and health checks. Route 53 supports multiple routing options, including simple routing, weighted routing, latency routing, failover routing, geoproximity routing, geolocation routing, multivalue answer routing, and IP-based routing.