You are on page 1of 13

L-Flow:

ELB:
Server 1

ELB Server 2

Server 3
Server 1 = 4000

LOAD 12000 Server 2 = 4000

Server 3 = 4000
ELB:
• Elastic Load Balancing automatically distributes incoming application
traffic across multiple targets, such as Amazon EC2 instances, containers,
IP addresses, Lambda functions, and virtual appliances. It can handle the
varying load of your application traffic in a single Availability Zone or
across multiple Availability Zones.
• OSI Layers.
• Select type:
1. Application LB
2. Network LB
3. Classic LB
Auto-Scaling
• AWS Auto Scaling monitors your applications and automatically
adjusts capacity to maintain steady, predictable performance at the
lowest possible cost. Using AWS Auto Scaling, it’s easy to setup
application scaling for multiple resources across multiple services in
minutes.
• Replication of your EC2 instances by setting rule on CPU
utilization...
• Eg: Great Indian Sale -Amazon.
1. Application LB - Protocol: (Layer-7) WWW.xyz.com/fb
• Application Load Balancer is best suited for load balancing
of HTTP and HTTPS traffic and provides advanced request
routing targeted at the delivery of modern application
architectures, including micro-services and containers.
Application Load Balancer routes traffic to targets within Facebook Instagram
Amazon VPC based on the content of the request.
2. Network Load Balancer: (Layer - 4)
• Network Load Balancer is best suited for load balancing of
Transmission Control Protocol (TCP), User Data-gram
Protocol (UDP), and Transport Layer Security (TLS) traffic Using Port Number
where extreme performance is required. Network Load Networks - VPC Concepts
Balancer routes traffic to targets within Amazon VPC and is
capable of handling millions of requests per second while
maintaining ultra-low latencies.
3. Classic Load Balancer: (Layer- 4 & 7)
• Classic Load Balancer provides basic load balancing across
multiple Amazon EC2 instances and operates at both the Uses Both the types
request level and the connection level. Classic Load
Balancer is intended for applications that were built within
the EC2-Classic network.
Load Balancer creation:

• Goto>Ec2>Load_Balancer>Create_Load_Balancer
• Select Classic Lb
Step 1: Name>VPC>Internet/Intranet>TCP
Step 2: Default Security Group & Configurations
Step 3: Health-Check
Step 4: Add EC2 instance or We can add later also
Step 5: Add tag
Step 6: Review and Create.
• Goto LauchConfig>Create-LC>Name it>Specify your AMI(CustomizedAMI) >instance
type>Userdata(Script)>Securitygroup>lauch config
#! /bin/bash
yum install httpd -y
service httpd start
echo "this is my lb instance" > /var/www/html/index.html
• ASG:
• >Goto Auto scalling group>Name>Switch to Launch Config>select your Config Default
VPC and Subnets>Attach to an existing load balancer>Choose from Classic Load
Balancers>Select your LB>Desired capacity>Minimum capacity>Maximum
capacity>Select Target tracking scaling policy>CPU Utilization(50)>Launch
• Check with

• Delete ASG>Launch Config>LB>Instances


• Application LB:
‒Lauch two instance with two application (Eg: FB & Insta) with
Userdata in config page other as default
‒Goto Target Group, Create target group>Name>Path(home-page
path)> create
‒Goto>createLB>Selete application LB>name>default vpc and
sub>on config select existing target group>choose your
group>create
‒Goto Listeners>View/edit rules>Add>Insert Rule>Condition-
Path>Action-Forward to>Select group>save it
Task:

• Now you have created completely, After several updation in the same server,
the EC2 machine is been terminated, Will I get the new updates? If Yes,
share it/ If No, How to do it?
• If Am hitting the LB’s DNS name, it should show me “Page1”, and if I refresh
it, It should show m “Page2” on a loop, What should I do for that?

You might also like