Lokendra Singh
4 min readDec 31, 2018

How to setup 2 Tier High Availability Architecture in AWS.

Setup HA Using AWS components

This story will be completed in 6 parts, each part will explain the components used here and the relevance of it in the diagram. How each component is playing a role to make the user experience better. You can start here: HERE

The main goal to use the AWS environment is to save money and get rid of unwanted prediction of traffic and Infrastructure requirement. You can go worldwide with AWS and it’s infrastructure and you need not set up your own data-center, purchase heavy server of the high cost.

Now, when you are using AWS infrastructure, so you need to keep in mind that your set up should be in High Availablity mode. As you can see the diagram that multiple components are used here to set up HA. You need to ensure the best user experience with the help of the technology you use. Here we are going to discuss how to achieve your end goal of the maximum uptime.

When a user hits your website URL in the browser, the user does not have any Idea/knowledge that what all tools and technologies you are using to serve your site. Let me explain here how does this infra will help you to obtain the maximum uptime.

Route53:- This component has a fancy name, but we need to understand the relevance of its name. The route is meant for Load Balancing. AWS Route53 can work as Load Balancer across Region, If you need to set up your infrastructure in more than 1 Region then you can use Route53 as a Load Balancer for your setup. Being a global service, it can serve across the region and it provides multiple types of load balancing such as:-

Simple routing policy — Use for a single resource that performs a given function for your domain, for example, a web server that serves content for the example.com website.

Failover routing policy — Use when you want to configure active-passive failover.

Geolocation routing policy — Use when you want to route traffic based on the location of your users.

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.

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.

Multivalue answer routing policy — Use when you want Route 53 to respond to DNS queries with up to eight healthy records selected at random.

Weighted routing policy — Use to route traffic to multiple resources in proportions that you specify.

You can select the routing policy as per your requirement based on your targets. AWS Route53 supports multiple targets, such as:-

A — IPv4 address, An IP address in IPv4 format, for example, 192.168.0.22. AAAA — IPv6 address:An IP address in IPv6 format, for example, 2001:0db8:85a3:0:0:8a2e:0370:7334.

CloudFront distribution domain name: d111111abcddgcef8.cloudfront.net
Elastic Beanstalk environment CNAME: example.myelasticbeanstalk.com
ELB load balancer DNS name: myexample-1.us-east-1.elb.amazonaws.com
S3 website endpoint: s3-website.us-east-1-example.amazonaws.com
Resource record set in this hosted zone: www.example.com
VPC endpoint: example.us-east-2.vpcexample.amazonaws.com
API Gateway custom regional API: d-abcde123433.execute-api.us-region-2.amazonaws.com

Now Let’s discuss, what is 53 in Route53? As we know that the default port number used for DNS is 53, so this use as DNS service as well. You can host and manage your Domain with the help of Route53. You can purchase and point DNS record using it. AWS Route53 support multiple records type such as:-

A : example, 10.0.0.1

AAAA: example, 2001:0db8:85a3:0:0:8a2e:0370:0123

CAA: A CAA record lets you specify which certificate authorities (CAs) are allowed to issue certificates for a domain or subdomain.

CNAME: A CNAME Value element is the same format as a domain name.

MX: Each value for an MX record actually contains two values, priority and domain name:

Now, there are two things- first is Priority and second is the Domain name, example 10 mail.example.com

NAPTR: A Name Authority Pointer (NAPTR) is a type of record that is used by Dynamic Delegation Discovery System (DDDS) applications to convert one value to another or to replace one value with another

NS: An NS record identifies the name servers for the hosted zone. The value for an NS record is the domain name of a name server. example, ns-1.example.com

PTR: A PTR record Value element is the same format as a domain name example, hostname.example.com

SOA: A start of authority (SOA) record provides information about a domain and the corresponding Amazon Route 53 hosted zone. Example:- ns-2048.awsdns-64.net hostmaster.awsdns.com 1 1 1 1 60

SPF: Sender Policy Framework records were formerly used to verify the identity of the sender of email messages.

SRV: A Service record (SRV record) is a specification of data in the Domain Name System defining the location.

TXT: A TXT record (short for text record) is a type of resource record in the Domain Name System (DNS) used to provide the ability to associate arbitrary text with a host/other names, such as human-readable information about a server, network, data center, or other accounting information.

So, now we can understand Route53 in a detailed manner, like what does it do and why did we use this in this diagram. This is used here as a DNS and this forwards requests on to CloudFront. How does CloudFront work? We shall discuss in the 2nd part…

Second Part Coming soon…