ELB + ASG Flashcards
(24 cards)
What is vertical scalability?
Increasing the size of the instance (eg. t2.micro –> t2.large)
What is horizontal scalability?
Increasing the number of instances for your applications (implies distributed systems)
High availability
Running your application in at least 2 data centres / availability zones (survive data center loss)
What is load balancers?
Servers that forward traffic to multiple servers (eg EC2 instances) downstream
Why use Elastic Load Balancer?
Managed load balancer, AWS guarantees it will work, takes care of maintenance and high availability
What do health checks do?
done on a port and a route to check health of ec2 instance (if response is not 200, it is not ok)
Load balancer security groups
Allow users to access load balancer from anywhere, but EC2 instance only allow traffic from load balancer
Application load balancer (v2)
Load balancing to multiple HTTP applications across machines, and to multiple applications on the same machine (eg. containers)
What are the 3 types of load balancers?
application load balancer, network load balancer and gateway load balancer
Network Load Balancer (v2)
Allows you to forward TCP and UDP traffic to your instances, high performance and ultra low latency
Network Load Balancer IP rules
NLB has one static IP per AZ and support assigning Elastic IP (want to expose application with set of static IPs)
NLB target groups
- EC2 instances
- private IP addresses
- Application Load Balancer
NLB health checks support …
TCP, HTTP and HTTPS protocols
Gateway Load Balancer
Deploy, scale and manage a fleet of 3rd party network virtual appliances in AWS (firewalls, intrusion detection and prevention systems, deep packet inspection systems)
How does gateway load balancer work?
All traffic goes through gateway load balancer, spreads traffic across target group of network virtual appliances, if it is accepted it forwards traffic back to GLB and then to application
Gateway load balancer target groups
EC2 instances, private IP addresses
What is sticky sessions / session affinity?
Same client is always redirected to the same instance behind a load balancer (make sure user doesn’t lose session data)
Two types of cookies for sticky sessions
application based cookies (cookie generated by target) and duration based cookies (cookie generated by load balancer)
Cross zone balancing
Each load balancer instance distributes evenly across all registered instances in all AZ
Cross zone balancing in application load balancer
enabled by default, no charges for inter AZ data
Cross zone balancing in network load balancer and gateway load balancer
Disabled by default, pay charged for inter AZ data if enabled
What problem does Server Name Indication (SNI) solve?
Loading multiple SSL certificates onto one web server to serve multiple websites
How does SNI work?
Requires the client to indicate the hostname of the target server in initial SSL handshake, and server will find correct cert