7. ELB + ASG Flashcards
What is an ALB?
Application Load Balancer
- Provides Layer 7 load balancing to multiple HTTP applications across machines (target groups)
- Provides balancing to multiple applications on the same machine (containers)
- Supports redirects (from HTTP to HTTPS)
- Can route based on URL path, URL hostname, and Query String
- Has a port mapping feature to redirect to a dynamic port in ECS
- Cross-zone load balancing: always on (can’t be disabled), free for inter-AZ
- Supports SNI for multiple listeners with multiple SSL certificates
What is an NLB?
Network Load Balancer
- Layer 4 (TCP and UDP)
- Used for extreme performance, TCP or UDP traffic
- Cross-zone load balancing: disabled by default, you pay for inter-AZ
- Supports SNI for multiple listeners with multiple SSL certificates
What is vertical scalability?
Increasing the size of your instance
What is horizontal scalability?
Increasing the number of instances / systems for your application
What is Load Balancer Stickiness?
The same client is always redirected to the same instance behind a local load balancer
- the “cookie” used for stickiness has an expiration date you can control
What is SNI?
Server Name Indication
- solved the problem of loading multiple SSL certificates onto one web server (to serve multiple websites)
What is Connection Draining?
Allows time to complete “in-flight requests” while the instance is de-registering or unhealthy
- stops sending new requests to the instance which is de-registering
- between 1 to 3600 seconds (default is 300 sec)
- set to low value if requests are short
- can be disabled
Where would you go to analyze incoming requests for latencies and client’s IP address patterns for an ALB?
ALB access logs
True or False: A Load Balancer can target EC2 instances only within an AWS Region.
True
What Load Balancer HTTP Error means it is at capacity or has no registered target?
HTTP 503
HTTP 503 indicates ‘Service unavailable’ error. This error in ALB is an indicator of the target groups for the load balancer having no registered targets.
Load Balancer HTTP Error indicating internal server error
HTTP 500
There are several reasons for their error: A client submitted a request without an HTTP protocol, and the load balancer was unable to generate a redirect URL, there was an error executing the web ACL rules.
What is CloudFront?
- Improves read performance, content is cached at edge
- Global Edge Network / Content Delivery Network
- Files are cached for a TTL (maybe a day)
- Great for static content that must be available everywhere
What is CNAME used for?
- hostname to hostname
- only for NON-ROOT domain (ex: mail.google.com)
What is ALIAS used for
- hostname to AWS resource
- works for ROOT and NON-ROOT domain (ex: google.com and mail.google.com)
ACM can be attached to which AWS resources?
Amazon Certificate Manager
- Elastic Load Balancer
- CloudFront
- API Gateway
- Elastic Beanstalk (through ELB)