What is the primary purpose of a load balancer in a system?
A load balancer distributes incoming network traffic across multiple servers to ensure no single server becomes overwhelmed, improving system reliability and performance.
Click to reveal answer
beginner
How does distributing traffic help improve system availability?
By spreading requests across multiple servers, if one server fails, others can continue handling traffic, reducing downtime and improving availability.
Click to reveal answer
intermediate
Name two common algorithms used by load balancers to distribute traffic.
Common algorithms include Round Robin (sending requests sequentially to each server) and Least Connections (sending requests to the server with the fewest active connections).
Click to reveal answer
intermediate
Why is load balancing important for scaling a web application?
Load balancing allows a web application to handle more users by distributing requests across multiple servers, enabling horizontal scaling and better resource use.
Click to reveal answer
beginner
What could happen if a system does not use a load balancer and receives high traffic?
Without a load balancer, one server might get overwhelmed, causing slow responses or crashes, leading to poor user experience and potential downtime.
Click to reveal answer
What is the main role of a load balancer?
AEncrypt network traffic
BDistribute traffic evenly across servers
CStore user data
DMonitor server health only
✗ Incorrect
Load balancers distribute incoming traffic to multiple servers to balance the load.
Which load balancing algorithm sends requests to the server with the fewest active connections?
ALeast Connections
BRound Robin
CRandom
DIP Hash
✗ Incorrect
Least Connections algorithm directs traffic to the server with the fewest active connections.
How does a load balancer improve system availability?
ABy redirecting traffic from failed servers to healthy ones
BBy encrypting data
CBy increasing server CPU speed
DBy caching data
✗ Incorrect
Load balancers detect failed servers and redirect traffic to healthy servers, improving availability.
What happens if a system with no load balancer receives a sudden spike in traffic?
AServers automatically multiply
BTraffic is evenly handled
CTraffic is automatically reduced
DOne server may become overloaded and crash
✗ Incorrect
Without load balancing, one server can get overwhelmed, causing crashes or slowdowns.
Which of these is NOT a benefit of using a load balancer?
AImproved fault tolerance
BBetter resource utilization
CAutomatic data backup
DScalability support
✗ Incorrect
Load balancers do not perform data backup; they distribute traffic and improve availability.
Explain why load balancers distribute traffic in a web system.
Think about how traffic affects server performance and user experience.
You got /4 concepts.
Describe how load balancing helps maintain system reliability during server failures.
Consider what happens when one server stops working.
You got /4 concepts.
Practice
(1/5)
1. Why do load balancers distribute incoming traffic across multiple servers?
easy
A. To prevent any single server from becoming overloaded and improve system reliability
B. To increase the number of servers needed for the system
C. To slow down the response time for users
D. To reduce the total number of user requests
Solution
Step 1: Understand server overload
When too many requests go to one server, it slows down or crashes.
Step 2: Role of load balancers
Load balancers spread requests evenly to keep servers healthy and fast.
Final Answer:
To prevent any single server from becoming overloaded and improve system reliability -> Option A
Quick Check:
Load balancers prevent overload = C [OK]
Hint: Load balancers keep servers from getting too busy [OK]
Common Mistakes:
Thinking load balancers reduce total requests
Believing load balancers slow down responses
Assuming load balancers increase server count unnecessarily
2. Which of the following is a common method used by load balancers to distribute traffic?
easy
A. Bubble sort
B. Binary search
C. Depth-first search
D. Round-robin
Solution
Step 1: Identify load balancing methods
Common methods include round-robin and least connections.
Step 2: Match options to known methods
Round-robin cycles through servers evenly; others are unrelated algorithms.
Final Answer:
Round-robin -> Option D
Quick Check:
Round-robin is a load balancing method = D [OK]
Hint: Round-robin cycles requests evenly [OK]
Common Mistakes:
Confusing sorting/search algorithms with load balancing
Choosing unrelated computer science terms
Ignoring common load balancing strategies
3. Consider a load balancer using the least connections strategy. If Server A has 3 active connections and Server B has 1 active connection, where will the next request be sent?
medium
A. Server B
B. Server A
C. Both servers equally
D. To a new server not listed
Solution
Step 1: Understand least connections strategy
It sends new requests to the server with fewer active connections.
Step 2: Compare active connections
Server A has 3, Server B has 1, so Server B has fewer connections.
Final Answer:
Server B -> Option A
Quick Check:
Least connections picks server with fewer connections = B [OK]
Hint: Send to server with least active connections [OK]
Common Mistakes:
Choosing server with more connections
Assuming equal distribution regardless of load
Thinking new servers are automatically chosen
4. A load balancer is configured to use round-robin but always sends requests to the same server. What is the most likely cause?
medium
A. The servers are all down
B. The load balancer is not tracking the last server used correctly
C. The network is too slow
D. The user requests are too few
Solution
Step 1: Understand round-robin behavior
Round-robin cycles through servers in order to balance load.
Step 2: Identify cause of repeated server selection
If it always picks the same server, it likely lost track of which server was last used.
Final Answer:
The load balancer is not tracking the last server used correctly -> Option B
Quick Check:
Round-robin needs correct tracking = A [OK]
Hint: Round-robin must remember last server used [OK]
Common Mistakes:
Blaming server downtime without checking load balancer
Assuming network speed affects server choice
Thinking low request volume causes imbalance
5. You design a system with a load balancer distributing traffic to 5 servers. Suddenly, one server becomes much slower but still receives equal requests. What change to the load balancing strategy can improve overall system performance?
hard
A. Use round-robin but add more user requests
B. Increase the number of servers without changing strategy
C. Switch from round-robin to least connections to avoid slow server overload
D. Disable the load balancer and send requests to one server
Solution
Step 1: Identify problem with round-robin
Round-robin sends equal requests regardless of server speed, causing slow server overload.
Step 2: Choose better strategy
Least connections sends requests to less busy servers, reducing load on slow server.
Final Answer:
Switch from round-robin to least connections to avoid slow server overload -> Option C
Quick Check:
Least connections adapts to server speed = A [OK]
Hint: Use least connections to avoid slow servers [OK]
Common Mistakes:
Adding servers without fixing load distribution
Increasing requests worsens overload
Disabling load balancer causes single point failure
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.