Sample questions
Question 1Easy
What does a load balancer do?
- Compiles application code
- Assigns IP addresses to laptops
- Spreads traffic
- Stores backups of the database
Answer: C. Spreads traffic
Explanation
Load balancers spread requests, perform health checks and stop sending traffic to unhealthy targets.
Step-by-step solution
- A load balancer receives incoming requests.
- It spreads them across several servers.
- It skips servers that fail health checks.
Why the other options are wrong
- A. Compiling is a build step.
- B. IP assignment is DHCP's job.
- D. Backups are a separate service.
Question 2Easy
Adding more servers to share the load is called:
- Horizontal scaling
- Defragmentation
- Vertical scaling (scaling up)
- Overclocking
Answer: A. Horizontal scaling
Explanation
Scaling out adds instances; scaling up makes a single instance bigger.
Step-by-step solution
- Adding more servers to share the load = scaling out.
- That is horizontal scaling.
Why the other options are wrong
- B. Defragmentation reorganises disk data.
- C. Vertical scaling makes one server bigger.
- D. Overclocking runs a CPU faster than rated.
Question 3Easy
Splitting a large database into smaller pieces by a key (for example user ID ranges), each on its own server, is called:
- Snapshotting
- Replication
- Sharding
- Caching
Answer: C. Sharding
Explanation
Sharding (horizontal partitioning) spreads data and write load across servers.
Step-by-step solution
- Data is split by a key, such as user ID ranges.
- Each piece (shard) lives on its own server.
- This is sharding, or horizontal partitioning.
Why the other options are wrong
- A. Snapshots capture a point-in-time copy.
- B. Replication copies the same data to many servers.
- D. Caching keeps hot data in memory.
Question 4Easy
In round-robin load balancing, requests are:
- Sent to each server in turn
- Always sent to the first server
- Dropped when servers are busy
- Sent to the server with the most memory
Answer: A. Sent to each server in turn
Explanation
Round-robin rotates through the list of servers, giving each an equal share in sequence.
Step-by-step solution
- Round-robin goes through the servers in order.
- Request 1 to A, 2 to B, 3 to C, then back to A.
Why the other options are wrong
- B. Always picking the first server is no balancing.
- C. Busy servers are not dropped by round-robin.
- D. Memory-based routing is a different algorithm.
Question 5Medium
Connection draining (deregistration delay) on a load balancer allows:
- Instances to skip health checks
- Disks to be wiped faster
- New connections to be sent to a removed instance
- In-flight requests to finish before an instance is removed
Answer: D. In-flight requests to finish before an instance is removed
Explanation
Draining stops new requests to an instance while letting existing ones complete, avoiding errors during scale-in or deploys.
Step-by-step solution
- An instance is being removed (scale-in or deployment).
- The balancer stops sending it new requests.
- Existing requests are allowed to finish, then it is removed.
Why the other options are wrong
- A. Draining does not skip health checks.
- B. Draining is unrelated to disk wiping.
- C. It does the opposite: no new connections.
Question 6Medium
Which load balancer type operates on TCP/UDP connections without inspecting HTTP content?
- Layer 2 switch
- DNS resolver
- Layer 7
- Layer 4
Answer: D. Layer 4
Explanation
L4 load balancers forward based on IP and port; they are fast but cannot route by URL.
Step-by-step solution
- Layer 4 is the transport layer: TCP and UDP.
- An L4 balancer forwards by IP and port.
- It does not inspect HTTP content.
Why the other options are wrong
- A. A Layer 2 switch forwards frames, not load balancing by connection.
- B. A DNS resolver translates names.
- C. Layer 7 does inspect HTTP.
Tip: L4 = TCP/UDP; L7 = HTTP.
Question 7Medium
Why do load balancers perform health checks?
- To avoid sending traffic to failing instances
- To update the operating system
- To measure user satisfaction
- To encrypt the database
Answer: A. To avoid sending traffic to failing instances
Explanation
Unhealthy targets are taken out of rotation until they pass checks again.
Step-by-step solution
- The balancer regularly checks each server, e.g. GET /health.
- Servers that fail are taken out of rotation.
- They return once they pass again.
Why the other options are wrong
- B. OS updates are separate.
- C. Health checks do not measure satisfaction.
- D. Encryption is unrelated.
Question 8Medium
Database read traffic is overwhelming a single primary database, while writes are moderate. Which approach directly helps?
- Move the database to archive storage
- Increase the number of web servers only
- Turn off indexes
- Add read replicas and send read queries to them
Answer: D. Add read replicas and send read queries to them
Explanation
Read replicas offload reads from the primary; writes still go to the primary.
Step-by-step solution
- Reads are the bottleneck; writes are moderate.
- Add read replicas that copy data from the primary.
- Send read queries to replicas; writes still go to the primary.
Why the other options are wrong
- A. Archive storage would make reads slower.
- B. More web servers would send even more reads to the database.
- C. Removing indexes makes reads slower.
Tip: Read-heavy = read replicas; write-heavy = sharding.
Question 9Hard
An auto-scaling group scales out when CPU exceeds 70% and in when it drops below 65%. The group keeps adding and removing instances every few minutes. What is the best fix?
- Remove all health checks
- Wider thresholds plus a cooldown
- Disable the load balancer
- Set both thresholds to 70%
Answer: B. Wider thresholds plus a cooldown
Explanation
Close thresholds cause flapping; hysteresis (wider gap) and cooldowns stabilise scaling.
Step-by-step solution
- 70% and 65% are too close.
- Adding an instance drops CPU below 65%, so one is removed; CPU rises above 70% again.
- This flapping is fixed with a wider gap (hysteresis) and a cooldown period.
Why the other options are wrong
- A. Removing health checks harms reliability.
- C. Disabling the balancer breaks the app.
- D. Equal thresholds make flapping worse.
Question 10Hard
A global application wants users routed to the nearest healthy region. Which mechanism is typically used?
- DNS routing by latency or geolocation
- A single-region Layer 4 load balancer
- Sticky sessions
- Vertical scaling of one server
Answer: A. DNS routing by latency or geolocation
Explanation
Global DNS routing services direct users to the closest or healthiest regional endpoint.
Step-by-step solution
- Users are spread around the world.
- Global DNS services can answer with the nearest or fastest region.
- They skip unhealthy regions.
Why the other options are wrong
- B. A single-region balancer cannot route between regions.
- C. Sticky sessions keep users on one server.
- D. Vertical scaling does not route users.
Practise all 25 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →