ELB and Auto-scaling Groups Flashcards
When we have an instance sitting behind an application load balancer what does an instance see in terms of the originating IP for each request?
Because load balancers intercept traffic between clients and servers, your server access logs contain only the IP address of the load balancer.
To see the IP address of the client, use the X-Forwarded-For request header. To see the protocol and port, use the X-Forwarded-Proto and X-Forwarded-Port
How would a distributed vs non distributed system be scaled (generally)
Distributed systems would generally be scaled horizontally. Non distributed systems would tend to scale vertically.
Which OSI layers do CLBs, ALBs and NLBs operate on?
CLB: 4(transport layer, TCP), 7(Application Layer)
NLB: 4
ALB: 7
Why would you use cross zone load balancing?
Cross-zone load balancing reduces the need to maintain equivalent numbers of instances in each enabled Availability Zone, and improves your application’s ability to handle the loss of one or more instances. However, AWS still recommend that you maintain approximately equivalent numbers of instances in each enabled Availability Zone for higher fault tolerance
By default, how often does an ELB make a health check?
every 5 seconds.
Which 3 protocols can an ALB support?
HTTP, HTTPS, Websockets
Is there a cost for traffic across AZ’s when using cross zone load balancing? Is this applicable to all load balancer types?
For ALB and CLB there is no charge
For an NLB there is.
For a public facing application or classic load balancer serving traffic from the web, what would the security group look like for:
The ELB public interface
The EC2 instance behind the ELB
?
For ELB Security Group:
Inbound HTTP port 80 source: 0.0.0.0/0
Inbound HTTPS port 443 source: 0.0.0.0/0
For Ec2
Inbound HTTP port 80 source: ELB’s Security Group ID
There are 6 components of an HTTP request that can be used in an ALB for routing - what are they?
You can route on: Host Header HTTP Header Path Query String Source IP Request Method (GET, POST, PUT etc)
Which load balancers have Cross AZ balancing enabled or disabled by default? Are there any costs in cross zone balancing?
NLB and CLB’s have cross AZ load balancing DISABLED by default.
ALBs can ONLY have cross AZ balancing enabled. There is no cost for cross AZ balancing for ALB’s and CLBs, but there is for an NLB
Generally, 50x and 40x errors refer to which side of an application stack?
50x - Application side
40x - Client Side
If your ELB can’t connect to your application instances what is the simplest likely explaination
Misconfigured security group on the application side is the most likely cause. I.e. we have not allowed inbound http traffic from the ELB’s security group.
Where does SSL termination occur in the following chain:
Client->ELB->Ec2 Instance (web server)
For each of the legs, is traffic HTTP or HTTPS?
Termination occurs on the ELB. This means traffic between client and ELB is HTTPS and traffic between the ELB and the Webserver is HTTP. The HTTP traffic is routed over the VPC so it is private but not encrypted.
How many SSL certificates can each load balancer type support? What is the format standard used to define the certificate?
ALB: Multiple - 25
NLB: Multiple - 25
CLB: One and only one per balancer
x509
What does SNI allow?
SNI allows multiple SSL certificates to be installed on a web server which allows multiple websites to be hosted on the same server