You are on page 1of 4

Autoscalling----------> only horizontal option is available

extra server add ---------> scale out


extra server remover ---> scale in

Autoscalling service is free.


Autoscallling is regional service.

desired capacity -----> normal load

lab:
1. create a AMI
create a EC2 instance
name ----------> my-ec2-1
os---------------> windows
AMI------------> windows server 2012 R2 Base
Instance type -> t2.micro
key pair
allow HTTP & HTTPS
connect -----> RDP client ----> get passwd----> decrypt

Select a server ----> action ----> images & template ----> create image
Image name ---> my-ec2-1-ami
Image description ----> autoscalling purpose
Go to AMI & check

2. Go to launch config (yamdhun navin server jo banel toh t2 micro banel)


create a launch config
name -----> my-launch-config
AMI ------> myec2-1-ami
Instance type ---> t2.micro
Security Group
Key pair

3. Go to Autoscalling Group
name -----> my-asg
Launch config ---> select above my-launch-config
*vpc -----> default
Avaibilty zone ----> select All (To achieve the high avaibility)
no load balancer
Health check
healt check grace period --->60 sec (check every 60 sec whether serve
is ok or not)
Configure group size
desired capacity ------>2
minimum capacity -->1
maximum capacity --> 4
Scalling Policy
name --> my-scalling-policy
metric type
Averager Cpu utillization (Generally used)
target value ---> 50 (%)
instance need (warm)---> 60 (machine create zalywr wait krnar mg navin
create krnr)

Add notification
send notification ---> AWS Autoscalling messafe
with this receipt ---> mail id
event types ---> launch & terminate
Add tag
key ---> name
Value-optional ----> techical-guftgu

4. We can see 2 server created on EC2


5. Adding a load on server

Access server 1 machine with RDP


create a file ---->write a.bat-----> save as a.bat---> open multiple type

Delete----> 1. autoscalling group----> 2. delete launch config 3. ami deregister 4.


ami snapsht delete 5. elastic volume delete

----------------------------------------------------------------------------
Elastic Load Balancer : (Region based)
1. App LB --------> HTTP/HTTPs
2. Netwk LB -----> database server (high bandwidth data)
3. Classic LB -----> combination of APP & Netwk LB
4. Gatway LB ---- > Security Releated

OSI model :
Application -----> gmail,fb
Presentation ----> extension
Session ----------> end to end
Transport --------> Ports
Network ---------> Router
Data Link --------> Switches
Physical ----------> Cables

ELB Listener:
1. to check

launch config & launch template difference

Steps: (Application load Balancer)


1. Create a Ec2-insance
name -----> web-server 1& 2
os----------> windows server 2019
instance type --> t2.micro
key pair
Allow, RDP,HTTP,HTTPs
no of instance --> 2

2. Select web server1


Connect ----> RDP ---> Download RDP ---> Decrypt Passwd---> get passwd
Go to Server Manager---> Add Role & Feature---> select web server IIS -->
install
Go to C drive ---> this PC---> C drive -----> inetpub ---> wwwroot---> delete
all---> create a new page ---> write-server 1----> save as index.html

3. Select web server1


Connect ---->RDP ---> Download RDP ---> Decrypt Passwd---> get passwd
Go to Server Manager---> Add Role & Feature---> select web server IIS -->
install
Go to C drive ---> this PC---> C drive -----> inetpub ---> wwwroot---> delete
all---> create a new page ---> write-server 2----> save as index.html

4. Go to target Group
target group name ---> alb-tg
Protocol ---> http
Health check ---> /
advanced Health checkup
Healthy threshold ----> 5
Unhealthy threshold---> 2
Timeout --------------> 10 sec
interval -------------> 30 sec
sucess code ---> 200

5. Go to Load Balancer
Select Application LB
name ---> myalb-mumbai
scheme --> internt facing
Mapping--> select a, b,c
Security group--> default
Listeners ----> http & alb-tg

6. go to load balancer----> copy dns id

7. create serve1 ami


image name --->web-ami

8. Go to launch config
create a launch config
name -----> my-launch-config
AMI ------> myec2-1-ami
Instance type ---> t2.micro
Security Group---> select existing

9. Go to Autoscalling Group
name -----> my-asg
Launch config ---> select above my-launch-config
vpc -----> default
Avaibilty zone ----> select All (To achieve the high avaibility)
attach to existing load balancer----> select existing load balancer target
group
Health check
healt check grace period --->60 sec (check every 60 sec whether serve
is ok or not)
Configure group size
desired capacity ------>2
minimum capacity -->2
maximum capacity --> 4
Scalling Policy
name --> my-scalling-policy
metric type
Averager Cpu utillization (Generally used)
target value ---> 50 (%)
instance need (warm)---> 60 (machine create zalywr wait krnar mg navin
create krnr)

10. delete existing server 1 & 2 ec2

11. New server 1 & 2 created from ami & autoscalling desired capacity

12. go to server 2 edit web text

13. go to load balancing dns ---> check on internet

-----------------------------------------------------------------------------------
-------------------------
Delete
1. Autoscalling group
2. launch config
3. Load balancer
4. target group
-----------------------------------------------------------------------------------
--------------------------

Lab : (Network Load Balancer)


1. create a Ec2-instance
name ----> my-web-01 & 02
os- windows server 2019
key pair
allow RDP, HTTP, HTTPs
no of instance =2

2. Connect with RDP my-web-01


server manger ----> add roles and features ----> webserver IIS--> install
Go to C drive ---> this PC---> C drive -----> inetpub ---> wwwroot---> delete
all---> create a new page ---> write-server 1----> save as index.html

3. Connect with RDP my-web-02


server manger ----> add roles and features ----> webserver IIS--> install
Go to C drive ---> this PC---> C drive -----> inetpub ---> wwwroot---> delete
all---> create a new page ---> write-server 2----> save as index.html
4. go to target group
choose ip address
target group name---->my-tg-nlb
Protocol --->tcp:80
insert private ip for server1 & 2

5. go to netwk load balancer


name-my-nlb
internetfacing
mapping -a, b , c
tcp:80 target group

6. select load balancer urn n check on internet n refresh

-----------------------------------------------------------------------------------
--------------------------
$iuweSLDiq9

You might also like