Domain Name System (DNS) and Amazon Route 53
Domain Name Servers(DNS)are the Internet’s equivalent of a phone book.They maintain a directory of domain names and translate them to Internet Protocol(IP)addresses.
This is necessary because,although domain names are easy for people to remember, computers or machines,access websites based on IP addresses.
When you type in a web address,e.g.,phani.website,your Internet Service Provider views the DNS associated with the domain name,translates it into a machine friendly IP address (202.153.xx.xx)and directs your Internet connection to the correct website.
Amazon Route 53 is an authoritative DNS system. An authoritative DNS system provides an update mechanism that developers use to manage their public DNS names.
It answers DNS queries,translating domain names into IP addresses so that computer scan communicate with each other.
Top-Level Domains (TLD s)
A Top-Level Domain(TLD)is the most general part of the domain.The TLD is the farthest portion to the right(as separated by a dot).Common TLD sare.com,.net,.org,.gov,.edu,and.io.
The last word in a domain name represents the”top level domain”.
The second word in a domain name is known as a second level domain name.
These top level domain names are controlled by the Internet Assigned Numbers Authority (IANA)in a root zone database which is essentially a database of all available top level domains.
You can view this database by visiting http://www.iana.org/domains/root/db
Each domain name becomes registered in a central database, known as the Who IS database.
A domain name is the human-friendly name that we are used to associating with an Internet resource.
The URL aws.amazon.com is associated with the servers owned by AWS. The DNS allows users to reach the AWS servers when they type aws.amazon.com into their browsers.IP Addresses an IP address is a network addressable location.Each IP address must be unique within its network.For public websites,this network is the entire Internet.
IPv4 addresses,the most common form of addresses,consist of four sets of numbers separated by a dot,with each set having up to three digits.
For example, 188.8.131.52 could be a valid IPv4 IP address.
With DNS, we map a name to that address so that you do not have to remember a complicated set of numbers for each place you want to visit on a network.
Due to the tremendous growth of the Internet and the number of devices connected to it, the IPv4 address range has quickly been depleted.
Today,most devices and networks still communicate using IPv4,but migration to IPv6 is proceeding gradually overtime.
All of the names in a given domain must be unique,there needs to be away to organize them so that domain names aren’t duplicated.This is where domain name registrars come in.
A domain name registrar is an organization or commercial entity that manages the reservation of Internet domain names.
A registrar is an authority that can assign domain names directly under one or more top- level domains.
These domains are registered with ICANN (The Internet Corporation for Assigned Names and Numbers),which enforces uniqueness of domain names across the Internet.
Each domain name becomes registered in a central database known as the WHO IS database.
Domain registrars: GoDaddy.com,Big Rock,Amazon etc
If you want to create a website, you first need to register the domain name.
If you already registered a domain name with an other registrar,you have the option to transfer the domain registration to Amazon Route 53.
It isn’t required to use Amazon Route 53 as your DNS service or to configure health checking for your resources.
Amazon Route 53 supports domain registration for a wide variety of generic TLDs(for example,.com and.org)and geographic TLDs(for example,.be and.us).
NS stands for Name Server records and are used by Top Level Domain servers to direct traffic to the Content DNS server which contains the authoritative DNS records.
A name server is a computer designated to translate domain names into IP addresses.These servers do most of the work in the DNS. Because the total number of domain translations is too much for any one server,each server may redirect requests to other name servers or delegate responsibility for the subset of sub domains for which they are responsible.
Name servers can be authoritative,meaning that they give answers to queries about domains under their control.Otherwise,they may point to other servers or serve cached copies of other name servers’data.
A zone file is a simple text file that contains the mappings between domain names and IP addresses. This is how a DNS server finally identifies which IP address should be contacted when a user requests a certain domain name.
Each zone file contains records. In its simplest form, a record is a single mapping between a resource and a name.These can map a domain name to an IP address or define resources for the domain,such as name servers or mail servers.This section describes each record type in detail.
Start of Authority (SOA) Record:
A Start of Authority (SOA) record is mandatory in all zone files, and it identifies the base DNS information about the domain. Each zone contains a single SOA record.
The SOA record stores information about the following.
The name of the DNS server for that zone
The administrator of the zone
The current version of the data file.
The number of seconds that a secondary name server should wait before checking for updates.
The number of seconds that a secondary name server should wait before retrying a failed zone transfer.
The maximum number of seconds that a secondary name server can use data before it must either be refreshed or expire.
The default TTL value(in seconds)for resource records in the zone
A and AAAA: Both types of address records map a host to an IP address.The A record is used to map a host to an IPv4 IP address,while AAAA records are used to map a host to an IPv6 address.
Canonical Name (C NAME): A Canonical Name (C NAME)record is a type of resource record in the DNS that defines an alias for the CNAME for your server(the domain name defined in an A or AAAA record).
Mail Exchange (MX): Mail Exchange(MX) records are used to define the mail servers used for a domain and ensure that email messages are routed correctly.The MX record should point to a host defined by an A or AAAA record and not one defined by a C NAME.
Name Server (NS): Name Server(NS)records are used by TLD servers to direct traffic to the DNS server that contains the authoritative DNS records.
Pointer (PTR): A Pointer(PTR) record is essentially the reverse of an A record. PTR records map an IP address to a DNS name,and they are mainly used to check if the server name is associated with the IP address from where the connection was initiated
Text (TXT): Text(TXT) records are used to hold text information.This record provides the ability to associate some arbitrary and un formatted text with a host or other name, such as human readable information about a server,network,data center,and other accounting information.
Service (SRV): A Service(SRV) record is a specification of data in the DNS defining the location(the host name and port number)of servers for specified services.The idea behind SRV is that,given a domain name (for example,example.com)and a service name(for example,web[HTTP],which runs on a protocol [TCP]),a DNS query may be issued to find the host name that provides such a service for the domain,which may or may not be with in the domain.
A hosted zone is a collection of resource record sets hosted by Amazon Route 53.Like a traditional DNS zone file,a hosted zone represents resource record sets that are managed together under a single domain name.Each hosted zone has its own meta data and configuration information.
There are two types of hosted zones:private and public.
A private hosted zone is a container that holds information about how you want to route traffic for a domain and its sub domains with in one or more Amazon Virtual Private Clouds(Amazon VPCs).
A public hosted zone is a container that holds information about how you want to route traffic on the Internet for a domain(for example, example.com)and its sub domains(for example,apex.example.comandacme.example.com).
Use an alias record,not a C NAME,for your hosted zone.C NAME s are not allowed for hosted zones in Amazon Route 53
This is the default routing policy when you create a new resource.Use a simple routing policy when you have a single resource that performs a given function for your domain(for example,one web server that serves content for the example.com website).In this case,Amazon Route 53 responds to DNS queries based only on the values in the resource record set(for example,the IP address in an A record).
With weighted DNS,you can associate multiple resources(such as Amazon Elastic Compute Cloud [Amazon EC2]instances or Elastic Load Balancing load balancers)with a single DNS name.
Use the weighted routing policy when you have multiple resources that perform the same function (such as web servers that serve the same website),and you want Amazon Route 53 to route traffic to those resources in proportions that you specify.For example,you may use this for load balancing between different AWS regions or to test new versions of your website(you can send 10 percent of traffic to the test environment and 90 percent of traffic to the older version of your website).
To create a group of weighted resource record sets, you need to create two or more resource record sets that have the same DNS name and type.You then assign each resource record set a unique identifier and a relative weight.
Latency-based routing allows you to route your traffic based on the lowest network latency for your end user(for example,using the AWS region that will give them the fastest response time).
Use the latency routing policy when you have resources that perform the same function in multiple AWS Availability Zones or regions and you want Amazon Route 53 to respond to DNS queries using the resources that provide the best latency.
Use a fail over routing policy to configure active-passive fail over,in which one resource takes all the traffic when it’s available and the other resource takes all the traffic when the first resource isn’t available.Note that you can’t create fail over resource record sets for private hosted zones.
For example,you might want your primary resource record set to be in U.S.West(N.California)and your secondary,Disaster Recovery(DR),resource(s)to be in U.S.East(N.Virginia).Amazon Route 53 will monitor the health of your primary resource end points using a health check.
A health check tells Amazon Route 53 how to send requests to the end point whose health you want to check:which protocol to use(HTTP,HTTPS,or TCP),which IP address and port to use,and,for HTTP/HTTPS health checks,a domain name and path.
After you have configured a health check,Amazon will monitor the health of your selected DNS end point.If your health check fails,then fail over routing policies will be applied and your DNS will fail over to your DR site.
Geo location routing lets you choose where Amazon Route 53 will send your traffic based on the geo graphic location of your users(the location from which DNS queries originate).For example,you might want all queries from Europe to be routed to a fleet of Amazon EC2 instances that are specifically configured for your Europe an customers,with local languages and pricing in Euros.
You can also use geo location routing to restrict distribution of content to only the locations in which you have distribution rights. Another possible use is for balancing load across end points in a predictable,easy-to-manage way so that each user location is consistently routed to the same endpoint.
You can specify geographic locations by continent,by country,or even by state in the United States. You can also create separate resource record sets for overlapping geographic regions, and priority goes to the smallest geographic region. For example,you might have one resource record set for Europe and one for the United Kingdom. This allows you to route some queries for selected countries(in this example,the United Kingdom)to one resource and to route queries for the rest of the continent(in this example,Europe)to a different resource.
More Information :https://www.fgrade.com/amazon-web-services/