ANS-C01 Question 64
Select 2Your company is hosting a web application on AWS that requires load balancing to distribute incoming traffic effectively. The application consists of a backend service that communicates via TCP on port 8080 and a frontend that serves HTTP requests on port 80. You need to choose the appropriate load balancing mechanisms to handle traffic efficiently based on OSI layers. Which of the following statements are correct about how load balancing works in this scenario?
- A
Layer 3 load balancing can use IP-based routing to distribute traffic across backend servers.
- B
Layer 4 load balancing can distribute TCP traffic for the backend service on port 8080.
- C
Layer 7 load balancing can inspect HTTP headers to route frontend traffic on port 80.
- D
Layer 3 load balancing can inspect HTTP headers for advanced request routing.
- E
Layer 4 load balancing can inspect the content of HTTP requests to make routing decisions.
Show answer and explanation
Correct answers: B, C
Explanation
In this scenario, the backend service communicates over TCP (Layer 4), so a Layer 4 load balancer is suitable for distributing traffic to the backend servers. The frontend serves HTTP requests, which can be handled by a Layer 7 load balancer, as it can inspect HTTP headers and URLs for routing decisions. Layer 3 load balancing is not applicable to this scenario since it operates at the network layer and does not handle application-specific routing.
- A. Incorrect.
Layer 3 load balancing works at the network layer and is responsible for IP-based routing, but it does not perform application-specific routing. AWS Elastic Load Balancers typically do not operate at Layer 3.
- B. Correct.
Layer 4 load balancing operates at the transport layer and can route TCP traffic based on ports, such as handling backend TCP traffic on port 8080.
- C. Correct.
Layer 7 load balancing operates at the application layer and can inspect HTTP headers and URLs to route requests, which makes it suitable for frontend HTTP traffic on port 80.
- D. Incorrect.
Layer 3 load balancing does not have the capability to inspect HTTP headers, as these are part of the application layer (Layer 7).
- E. Incorrect.
Layer 4 load balancing does not inspect the content of HTTP requests. This functionality belongs to Layer 7 load balancing.