ELB and ASG Flashcards
Availability, Scalability and Elasticity
Availability = Running your application in at least two AZs
Scalability = Application can take greater loads either by increasing the size (verticle) or add more instances (horizontal)
Elasticity = Same as horizontal scalability
ELB
Spread load across more than 1 instance based on incoming traffic
TYPES
1. Application Load Balancer (Layer 7)(HTTP/HTTPS, uses DNS or URL)
2. Network Load Balancer (Layer 4) (TCP/UDP, users Static IP)
3. Gateway Load Balancer (Layer 3, GENEVA, used for intrusion detection and routes to third party security virtual appliances before sending it to EC2)
ASG
ASG scale out (add) and scale in (remove) the EC2 instance based on load
We have to set minimum and maximum number of EC2 beforehand.
ASG Strategies
Manual scaling - Update the size manually
Condition based scaling -
1. Simple step scaling
e.g. When all my EC2 instance goes over 70% for five minutes, then add two units to capacity to my ASG
2. Target tracking scaling
e.g. I want the average CPU utilization of all the EC2 instances in my ASG to stay at around 40% on average
3. Scheduled Scaling
e.g. Increase the minimum capacity to 10 EC2 instances in my ASG
at 5pm on Friday
4. Predictive scaling
e.g. using ML to predict the pattern and scale