AWS: Fundamentals Flashcards
What is the difference between horizontal and vertical scaling?
Vertical scaling (“Scaling up”) means moving your app to a server with more size/power than your current app server. In EC2 terms, this would mean increasing the size of an instance e.g. t2.micro to t2.large.
Horizontal scaling (“Scaling out”) means adding more servers to your existing pool of resources duplicating the app. Performance improvements are found because load is now distributed amongst more servers. In EC2 terms, this would mean setting up more app servers.
What is a load balancer?
A server that forwards internet traffic to multiple downstream servers.
What types of load balancer does AWS offer?
- Classic Load Balancer
- Application Load Balancer
- Network Load Balancer
- Gateway Load Balancer
What kind of traffic is supported with Classic Load Balancers?
TCP (layer 4)
HTTP & HTTPS (layer 7)
What kind of traffic is supported with Application Load Balancers?
HTTP & HTTPS & Websockets (layer 7) only
What kind of traffic is supported with Network Load Balancers?
UDP & TCP traffic
What features are present on the CLB, the ALB and the NLB? What do they have in common?
- Spread load across multiple downstream targets
- Implement health checks of downstream targets
- Highly available (comprised of multiple instances managed by AWS) and elastic
- TLS Termination (Decrypt SSL/TLS traffic before sending on to servers reducing load and saving the uploading of SSL certs on every machine)
- Can be internet facing or internal, separating public traffic from private traffic
- Export useful metrics to CloudWatch
Whatever the ELB, you must always configure at least one listener. What is a listener?
The listener defines how your inbound connections are routed to your downstream target groups (e.g. fleet of EC2 instances).
It will listen for traffic based on a given port and protocol that you configure.
What is a target group?
A group of resources that your want your ELB to route requests to.
Most of the ELBs are configured so that you register targets in target groups, and route traffic to the target groups.
Which ELB is different and how does it register targets?
Classic Load Balancer
CLB registers instances with the load balancer. There are no target groups defined.
Which ELB(s) can route to many ports on the same target?
Application Load Balancer
Network Load Balancer
Which ELB(s) supports routing to targets outside AWS?
Application Load Balancer
Network Load Balancer
Which ELB(s) can be used in EC2-Classic?
Classic Load Balancer
Which ELB(s) preserves the source IP?
Network Load Balancer.
NLB preserves the source IP address in TCP/UDP packets.
Whereas the ALB and ELB sends its own IP address to downstream targets.
Application Load Balancers and Classic Load Balancers automatically add X-Forwarded-For, X-Forwarded-Proto, and X-Forwarded-Port headers to the request. The X-Forwarded-For contains information about the client ip address. The X-Forwarded-Proto request header helps you identify the protocol (HTTP or HTTPS) that a client used. The X-Forwarded-Port request header helps you identify the destination port that the client used.
Which ELB(s) support routing traffic to targets based on the path in the url, the hostname or the query string?
Application Load Balancer