AWS Load Balancers
- AWS has the following load balancers
- Classic Load Balancer
- Network Load Balancer (Layer 4)
- Application Load Balancer (Layer 7)
Setup for ec2 instance with application
- Create an ec2 instance as recommended in previous session
- Now lets create a reusable ami
- Wait for the AMI to be created
Setup for Network load balancing
- VPC for load balancer
- Health checks in Load Balancer help in identifying wheter the application is up or not in specific vm. If the health checks fail, then LB will not forward requests to EC2 instance.
- Create a vpc with 4 subnets
- Lets create two ec2 instances in two different subnets with 80 port opened
- We have two ec2 instances with private ips and 80 port opened for communication from any where
- Now lets create a Network load balancer
- Now we should be able to access the application using NLB