HA Architecture Flashcards
What is a load balancer?
A physical or virtual device that is used to help you balance network load across multiple servers.
What are the three different types of load balancers?
- Application Load Balancer
- Network Load Balancer
- Classic Load Balancer
What are application load balancers?
best suited for load balancing of http and https traffic. They operate at Layer 7 and are application-aware. Can create advanced request routing, sending specified requests to specific web servers.
What are network load balancers?
Best suited for load balancing of TCP traffic where extreme performance is required. Operating at connection level (Layer 4), capable of handling millions of request per second while maintain ultra-low latencies
What are classic load balancers?
Legacy elastic load balancers. You can load balance HTTP/HTTPS application and use Layer 7- specific features such as X-forwarded and sticky sessions. You can also use strict Layer 4 load balancing for applications that rely purely on the TCP Protocol
What does the 504 error in a classic load balancer mean?
It means that the application is having issues. This could be either at the Web Server layer or at the Database Layer, not the actual load balancer. Identify the issue and scale it up or out where possible.
What is the X-Forwarded-For?
It contains the public IP address of the user that is coming through via the load balancer.
What is a target group in load balancing?
Where your load balancer routes the requests to targets within that target group. Can have groups of EC2 instances for each region / language / etc.
True or False. You use classic load balancers for intelligent routing.
False. You use application load balancers for intelligent routing.
True or False. Instances monitored by ELB are reported as: InService or OutofService.
True.
True or False. When using a load balancer, you are given both a DNS name and an IP address.
False. They have their own DNS name. You are never given an IP address.
What are sticky sessions?
Classic Load Balancer routes each request independently to the registered EC2 instance with the smallest load. Sticky session allows you to bind a user’s session to a specific EC2 instance. Ensures all requests from the user during the session are sent to the same instance.
Why do you want to use sticky sessions?
Say you are saving something onto the EC2 locally, you want to enable sticky sessions to allow you to be able to retrieve that information readily.
What if you sign on and notice that all the traffic is going to only one EC2 instance?
- Enable Sticky Sessions
- Disable Sticky Sessions?
Disable sticky sessions
What is cross-zone load balancing?
Allows Elastic/Application load balancers to direct traffic across different zones to help ensure efficiency on your EC2 instances.
A user is using Route53 and 100% of traffic is being sent to US-EAST-1A. You notice there is an EC2 instance in US-EAST-1B that isn’t getting any of the traffic, how can you make sure it gets it’s even share of the traffic?
Enable Cross Zone Load Balancing.
What are path patterns?
Create a listener with rules to forward requests based on the URL path. Known as path-based routing.
True or False. Sticky session enable your users to stick to the same EC2 instance. It can be useful if you are storing information locally to that instance.
True.
True or False. Cross Zone Load balancing enables you to load balance across multiple endpoint locations.
False. Cross Zone Load balancing enables you to load balance across multiple availability zones.
True or False. Path patterns allow you to direct traffic to different EC2 instances based on the URL contained in the request.
True.
What are the three components of auto scaling?
- Groups - logical component
- Configuration Templates - instructions for each group on how to and what to launch
- Scaling Options - ways to scale your auto scaling group. ie dynamic scaling (resource based), schedule (monday morning 9 AM), etc.
What are the 5 different scaling options (list them)?
- maintain current instance levels at all times
- scale manually
- scale based on a schedule
- scale based on demand
- use predictive scaling
True or False. Maintaining your current instance at all times involves Amazon to perform a periodic health check on running instances within auto-scaling group. If it finds an unhealthy instance, it prompts the user to notify.
False. Maintaining your current instance at all times involves Amazon to perform a periodic health check on running instances within auto-scaling group. If it finds an unhealthy instance, it terminates that instance and launches a new one.
True or False. Manual scaling allows you to specify only the change in your maximum, minimum, or desired capacity of your auto-scaling group.
True. You can scale up / down the # of instances that you want to maintain.