Load Balancing Flashcards
What is vertical scalability?
Scale by increasing existing resources of a system
i.e: add cpu and memory to a vm.
What is horizontal scalability?
Scale by adding more infrastructure
i.e: add more servers to existing infrastructure.
What do you need to spread your resources across to achieve high availability in AWS?
You need to build your infrastructure acreoss Multiple AZs (which are made of 1 or more datacenters each).
Or in extreme cases across Multiple Regions.
What is passive HA?
It’s the same as Active-Passive HA
What is active HA?
It’s the same as Active-Active HA
Who manages the elastic load balancer?
AWS manages and ensures it will be always working
What is elastic load balancer?
A service that routes incoming traffic to different destinations depending on pre-specified sets of rules.
What are health checks in ELB?
The load balancer checks if the targets are up, and with that in mind decides to send or not send traffic to those targets.
How does the ELB do its health checks?
The health checks are either HTTP, HTTPS, or TCP.
With a protocol, a port, and a route (i.e: https protocol, checking the /health URL of the app) it checks the health of a web app for example. If the returned code is not an OK response, it declares the instance unhealthy. (The ok response is usually the 200 code for HTTP/HTTPS)
What are the kinds of ELB load balancers?
1 -Classic Load Balancer (CLB)
2 -Application Load Balancer (ALB)
3 -Network Load Balancer (NLB)
4 -Gateway Load Balancer (GLB)
The CLB still works but is not recommended by aws and is deprecated.
Which protocols is ELB ALB compatible with?
Application load balacer supports HTTP, HTTPS and Websocket protocols
Which protocols is ELB NLB compatible with?
TCP, TLS, SSL, and UDP protocols.
Which protocols is ELB GLB compatible with?
It operates directly at layer 3 (With IP Protocol).
What does the ALB balance?
Incoming HTTP/HTTPS traffic
What does the ALB balance between?
Between Target Groups. These could be comprised of EC2 instances, ECS (kubernetes), lambda functions, and directly IP Addresses
What kinds of balancing (routing) does ALB support
1) Based on the URL path, for example: abc.com/users towards a target group, and abc.com/posts towards a different target group.
2) Based on the URL hostname, for example: one.ex.com & other.ex.com
3) Based on a query, for example ex.com/users?id=123 or id?124.
What is a redirect ALB can do?
It can redirect HTTP traffic to HTTPS.
What are target groups in ALB?
The target groups are what ALB balances between. For example a target group could be a set of EC2 instances.
What are good ALB use cases?
Micro services, containerized applications like docker and amazon ECS, Web applications.
Whats the difference between Internal and internet facing in ELB?
Internal has no public IP. It routes requests from clients to targets only using source private ip addresses.
Internet facing routes requests from clients over the internet, to targets.
(This is related to the incoming request traffic).
What is a ELB Listener?
A listener is what checks for connection requests using the port and protocol you configure. The rules that you define for a listener determine how the load balancer routes requests to its registered targets.
What service are the terms listeners, clients, and targets related to? And define each of the terms
Elastic Load Balancer.
The load balancers listeners listen to requests from the clients to access a load balancing target or target group.
How does Network configuration work in ELB?
What is it for?
First you have to choose a VPC. Then you choose at least 1 or more AZs within the region you are configuring under, and a subnet for each AZ.
This is for defining which AZs the targets the load balancer routes traffic to are in.
How do security groups work with ELB?
A security group is attached to the load balancer, and its what controlls the allowed incoming traffic to the load balancer and its listeners.
GLB doesnt use SG cause it redirects packets directly.