EC2 - Load Balancing and Auto scaling
Load balancing and Auto scaling Let's suppose we have deployed our web application to the EC2 instance. And all of the sudden, our app. got viral and previously 10k daily users became 1 million. So we want our infrastructure to use less resources when there is little or no user, more when there is high load or spike, it somehow must adjust itself in a way to withstand to this load. This is when auto scaling comes into play. Load balancer - is a proxy that allows you to distribute connections to servers. It provides fault tolerance and high availability . Load balancer can be front of EC2,ECS, other load balancers, lambda functions etc. There are 3 types of load balancer in AWS: Application load balancer (operates at Application layer (L7) http, https etc.) Network load balancer (operates at IP layer (L4) - TCP, TLS, UDP etc.) Gateway load balancer (uses Geneva protocol, balances firewalls,IDS/IPS, operates at layer 3 ) Auto scaling - allows you to automatically and terminate EC2