0
0
HLDsystem_design~20 mins

Layer 4 vs Layer 7 load balancing in HLD - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Load Balancing Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference in Protocol Awareness
Which statement correctly describes the protocol awareness difference between Layer 4 and Layer 7 load balancers?
ALayer 4 load balancers use DNS queries for routing, and Layer 7 load balancers use MAC addresses.
BLayer 4 load balancers inspect HTTP headers to route traffic, whereas Layer 7 load balancers only use IP addresses.
CLayer 4 load balancers operate based on IP address and TCP/UDP ports without inspecting the content, while Layer 7 load balancers inspect the application data to make routing decisions.
DLayer 4 load balancers analyze the full application payload, while Layer 7 load balancers only check the TCP handshake.
Attempts:
2 left
💡 Hint
Think about which OSI layers correspond to IP and TCP versus application data.
Architecture
intermediate
2:00remaining
Choosing Load Balancer Type for a Web Application
You are designing a web application that requires routing users to different backend servers based on URL paths and user sessions. Which load balancer type should you choose?
ALayer 7 load balancer, because it can inspect HTTP headers and URLs to route requests.
BLayer 4 load balancer, because it efficiently routes based on IP and port.
CDNS load balancing, because it resolves domain names to different IPs.
DHardware firewall, because it filters traffic based on security rules.
Attempts:
2 left
💡 Hint
Consider which load balancer can look inside the HTTP request to route based on URL paths.
scaling
advanced
2:30remaining
Scaling Impact of Layer 4 vs Layer 7 Load Balancers
Which statement best describes the scaling impact when using Layer 4 versus Layer 7 load balancers in a high-traffic environment?
ALayer 4 load balancers require more CPU resources because they decrypt SSL traffic, unlike Layer 7 load balancers.
BLayer 7 load balancers scale better because they cache all application data, reducing backend load.
CLayer 7 load balancers scale better because they operate at the network layer, which is faster.
DLayer 4 load balancers generally scale better because they perform less processing per packet compared to Layer 7 load balancers.
Attempts:
2 left
💡 Hint
Think about how much data each load balancer inspects and processes.
tradeoff
advanced
2:30remaining
Tradeoffs Between Layer 4 and Layer 7 Load Balancers
What is a key tradeoff when choosing between Layer 4 and Layer 7 load balancers?
ALayer 4 load balancers provide detailed content inspection but are slower; Layer 7 load balancers are faster but only route by IP.
BLayer 4 load balancers offer faster routing but less intelligent traffic management; Layer 7 load balancers provide detailed routing but with higher latency.
CLayer 4 load balancers can route based on user sessions; Layer 7 load balancers cannot.
DLayer 4 load balancers require SSL termination; Layer 7 load balancers do not.
Attempts:
2 left
💡 Hint
Consider speed versus intelligence in routing decisions.
estimation
expert
3:00remaining
Estimating Backend Server Load with Layer 7 Load Balancer
A Layer 7 load balancer inspects HTTP headers and routes requests to backend servers. If the load balancer handles 10,000 requests per second and each inspection adds 0.1 ms processing time, estimate the total CPU time spent per second on inspection. Choose the closest value.
A1 second of CPU time per second
B0.1 seconds of CPU time per second
C10 seconds of CPU time per second
D100 seconds of CPU time per second
Attempts:
2 left
💡 Hint
Multiply requests per second by processing time per request.