Load Balancer & Autoscaling
Load Balancer & Autoscaling
Load Balancer & Autoscaling
WWW.CYBERFRAT.COM
Vertical Scalability 3
WWW.CYBERFRAT.COM
Horizontal Scalability 4
WWW.CYBERFRAT.COM
High Availability 5
horizontal scaling
WWW.CYBERFRAT.COM
Vertical Scalability 6
WWW.CYBERFRAT.COM
What is load balancing? 7
WWW.CYBERFRAT.COM
Why to use load balancer? 8
WWW.CYBERFRAT.COM
Why use an EC2 Load balancer ? 9
WWW.CYBERFRAT.COM
Health Checks 10
Health checks
WWW.CYBERFRAT.COM
Types of Load Balancers on AWS 11
• Currently AWS has 3 types of Load balancer those are managed by them.
• Classic Load balancer (v1 Old generation) - 2009
• HTTPS, HTTP, TCP
• Application Load balancer (v2 new generation ) - 2016
• HTTPS, HTTP, WebSocket
• Network Load balancer (v2 new generation ) - 2017.
• TCP, TLS(secured TCP) & UDP
When creating a load balancer you can select if the load balancer is internal facing or
public facing
WWW.CYBERFRAT.COM
Classic Load balancer 12
listener internal
Client CLB
EC2
WWW.CYBERFRAT.COM
Application Load balancer 13
WWW.CYBERFRAT.COM
Application Load balancer 14
WWW.CYBERFRAT.COM
Application Load balancer 15
amit.com/user
www
WWW.CYBERFRAT.COM
Network Load balancer 16
WWW.CYBERFRAT.COM
Load Balancer Stickiness 17
• If Stickiness is enabled the same client's request will be always redirected to same
instance behind load balancer.
• This option is available for only classic & Application Load balancer.
• We can choose the cookie expiry time.
• Useful when we have make sure the user will not lose his session.
WWW.CYBERFRAT.COM
SSL/TLS - Basics 18
• With SSL certificate we can have the traffic between the clients & load balancer to
be encrypted in transit (in-flight).
• SSL - Secure Socket Layer
• TLS - Transport Layer Security, Newer version than SSL
• These SSL Certificates are issued by CA ( Certificate Authorities)
• e.g GoDaddy, Digicert, Symantec etc..
• You have to renew the SSL certificates as they have expiry dates.
• LB uses X.509 certificates ( SSL/TLS server certificates)
• You can manage all the certificates in Amazon's certificate manager called as
AWS Certificate Manager.
• We can also create our own certificate (self-signed) ls upload to ACM.
WWW.CYBERFRAT.COM
What’s an Auto Scaling Group? 19
• In real time environment the traffic to your website or Application can change at
any point of time.
WWW.CYBERFRAT.COM
Auto Scaling Group in AWS ? 20
WWW.CYBERFRAT.COM
Auto Scaling with AWS Load Balancer ? 21
WWW.CYBERFRAT.COM
ASGs have the following attributes: 22
• A Launch configuration.
• AMI + instance type
• Ec2 User data
• EBs volumes
• Security group
• SSH key pair
● Min Size / Max size / Initial capacity
● Network + subnet Information
● Load balancer information
● Scaling Policies
WWW.CYBERFRAT.COM
Auto scaling Alarms. 23
WWW.CYBERFRAT.COM
Auto scaling Custom metric. 24
WWW.CYBERFRAT.COM