Scalability Flashcards
How to ensure horizontal scaling?
- auto scaling group
- load balancer
How to ensure vertical scaling?
use more powerful ec2 instances
How to ensure high availability
- auto scaling group multi AZ
- load balancer multi AZ
What are the advantages of load balancers?
- spread load between instances
- expose a single dns to the internet
- provide https for websites
- do health checks for instances
- handle failures of ec2 instances
Why use elastic load balancer?
- managed by aws
- less effort
- integration with many aws offerings
What load balancers are available?
- classic load balancer
- application load balancer
- network load balancer
- gateway load balancer
How can load balancers improve security of ec2 instance?
Through security groups.
- The sg of the load balancer can be opened to the internet.
- The sg of the ec2 instances can be restricted to only let traffic in from the load balancer
How can an application load route traffic to different target groups?
- Based on path in URL
- Based on hostname in URL
- Based on Query String, Headers
You would need one classic load balancer for each application.
What can an application load balancer target group consist of?
- ec2 instances
- ecs
- lambda functions
- ecs
When do you need network load balancer and what does it do?
- for very high traffic and low latency balancing
- it forwards the traffic at the protocol layer
How can you make sure a user does not use its session data?
By using sticky sessions using cookies
How can you secure the connection using load balancers?
- using a ssl/tls certificate
- certificates can be managed through aws certificate manager
How can you react to a decreasing or increasing load using a load balancer?
attach a load balancer to an auto scaling group
What are the available scaling policies?
-Dynamic ScalingPolicies
-Target Tracking Scaling (e.g. CPU to stay around 40%)
-Simple Scaling (When a CloudWatch alarm is triggered (example CPU > 70%), then add 2 units
• When a CloudWatch alarm is triggered (example CPU < 30%), then remove 1)
- Scheduled Actions - Predictive Scaling
What are good metrics to scale on?
- CPU utilization
- Request count per target
- any other custom cloudwatch metric