What is Load balancer?

A device or software that distributes users' requests among several servers to spread the load. It checks the state of each server regularly (health checks) and removes failed servers from distribution, so it also serves a redundancy role. Unless it is itself made redundant, the load balancer becomes a single point of failure.

Japanese name: ロードバランサ

Load balancer appears in 3 practice questions across 3 topics, including Web Technology Basics, System Architecture and Reliability, Cloud and Container Basics.

Field: System Architecture and Reliability

Try it: questions about Load balancer

Three application servers are placed behind a load balancer, which distributes requests to them in turn (round robin). The session information of a logged-in user is stored only in the memory of the server that handled the login. Which of the following is an appropriate pair of a likely problem and its countermeasure?

  1. AWhen a request goes to another server, the session is not found and the user appears to be logged out. Keep sessions in a shared store that all servers can use
  2. BThe three servers issue the same session ID separately and the IDs collide. Make session IDs short sequential numbers so that users can remember them
  3. CThe load balancer cannot read cookies, so HTTPS stops working. Stop encrypting the traffic between the load balancer and the servers
Show answer and explanation

Answer: A. When a request goes to another server, the session is not found and the user appears to be logged out. Keep sessions in a shared store that all servers can use

If session information exists only in one server's memory, a server that receives the next request cannot identify the user when the request is distributed to it. One countermeasure is to keep sessions in a shared store that every server can read and write (an in-memory data store or a database). Another is session persistence (sticky sessions), which keeps sending the same user's requests to the same server, but sessions are lost if that server stops and the load also tends to become uneven. Keeping servers stateless makes it easy to add or remove servers.

A system has two redundant load balancers, three web servers behind them, and a single database server used by all the web servers. Among the devices listed here, which is a single point of failure (a point whose stopping stops the whole system)?

  1. AThe load balancers
  2. BThe web servers
  3. CThe database server
Show answer and explanation

Answer: C. The database server

A single point of failure (SPOF) is a point where a stop in just that one place stops the whole system. The load balancers are made redundant with two units, and there are three web servers and the load balancers can remove a failed server from distribution, so processing continues even if any one of them stops. There is only one database server and every web server uses it, so if it stops, the whole system stops. Making the database server redundant too, for example with a cluster configuration, removes this single point of failure.

Load balancer in the explanations

Questions that mention Load balancer (3)

  1. Three application servers are placed behind a load balancer, which distributes requests to them in turn (round robin). The session information of a logged-in user is stored only in the memory of the server that handled the login. Which of the following is an appropriate pair of a likely problem and its countermeasure?
  2. A system has two redundant load balancers, three web servers behind them, and a single database server used by all the web servers. Among the devices listed here, which is a single point of failure (a point whose stopping stops the whole system)?
  3. Two environments with the same configuration as production are prepared; the current version keeps running in one while the new version is installed and checked in the other, and then the load balancer is switched over to it all at once. If there is a problem, switching back quickly returns to the old version. Which of the following is this release method?

Books on System Architecture and Reliability Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Single point of failure (SPOF) Blue-green deployment Canary release Differential backup Dual system Duplex system Fail-safe Fail-soft Fault tolerance Fool-proof

Back to the glossary