Lab setup
- Create an ec2 instance (ubuntu)
- Install apache server
sudo apt update
sudo apt install apache2 -y
- Now check the web page
Route 53 (DNS as a Service in AWS )
- Route 53 is DNS as a service from AWS
- We can buy domains and create zones over here
- Now we can create records to point domain name to aws resources
- Lets create a record to point the domain name to aws loadbalancer
- Routing policies:
- Simple
- Failover:
- Geolocation: Used when we want to route traffic based on location of user
- Geoproximity:
- Latency routing
- weighted routing
Load Balancers
- We have two types of loadbalancers
- Layer 4
- Layer 7
- In AWS we would loadbalance ec2 machines which are configured for autoscaling
- In this exercise we will not be enabling autoscaling
- IN AWS we have 3 load balancers
- Elastic Load Balancer (Classic load balancer): This is classic loadbalancer used for both layer4 and layer7
- Network Load Balancer (Layer 4 load balancer)
- Application Load Balancer (Layer 7 loadbalancer)
- Lets find a health check for the apache
- http request to the ip should respond with 200
- Lets create an Elastic load balancer
- Architecture
- Creation
- Note (We have statically added ec2 instances in reality we would be auto scaling group which we will learn soon)
- Now we have a DNS record of load balancer which points to ec2 instances
- Architecture
