Elastic Load Balancer offer 3 types of Load balancing
- Application Load Balancer: Application load balancer suitable for distribute traffic for HTTP and HTTPS traffic and provides advance request routing targeted micro service and container
- Network Load Balancer: Network load balancer is suitable for load balancing of TCP, UDP and TLS traffic where performance is require
- Classic Load Balancer: Classic Load Balancer provide load balancing accross multiple EC2 instance and operates at both request and connection level
Application Load Balancer: In example we will create 2 Web server with same index.html page and apply application load balancer between them.
AppServer1 : 10.0.0.1
AppServer2: 10.0.0.2
- Once both servers ready we will configure Load Balancer from EC2 console.
- Once you click on Create Load Balancer, you will get 3 options for load balancer. We will select Application Load Balancer
- Once you click on create it will ask for some details like name and Availability zone. You need to select at least 2 subnet in which we have create virtual machine for Webserver. In this example I have create one in us-east-1a and one in us-east-1b
- Then click on Configure Security Settings and use security group for Load Balaner
- Configure Routing for load balancer use index.html for path for verification attribute for health check
- Healthy threshold: The Number of consecutive health check success require before considering unhealthy target healthy
- Unhealthy threshold: The number of consecutive health check failures required before considering a target unhealthy (2-10).
- Timeout: The amount of time, in seconds, during which no response means a failed health check (2-120 seconds)
- Interval: The approximate amount of time between health checks of an individual target (5-300 seconds).
- Register Targets: Add new targets for load balancing in example I have added both virtual machines.
- You will review at the end of Instance
- It will take some time to crate and you will find all details at the end
- You will get one DNS name for load balancer. You can browse and it will automatically redirect to backend web server
- To add new subnet on Load balancer, click on Load balancer edit subnets and add Availability zone select subnet.
No comments:
Post a Comment