JuniorArchitecture & Design

How does putting a load balancer in front of your app improve availability, and what does it NOT solve?

What they are really testing: Whether you understand health checks and traffic distribution as the actual availability mechanism, and whether you can name the failure modes a load balancer leaves untouched. The second half is the real test.

A real interview question

How does putting a load balancer in front of your app improve availability, and what does it NOT solve?

What most people say

drag me

It makes the app faster and handles more traffic, so it is more available.

It conflates throughput with availability and never mentions health checks or taking unhealthy instances out of rotation, which is the actual availability mechanism. It also claims a benefit the question is explicitly probing the limits of.

The follow-ups they ask next

  • Your load balancer shows all targets as unhealthy but the app works fine when you curl it directly. Where do you look?

    Check the health check path and port match what the app serves, the health check expects the right status code, and the security group on the instances allows the load balancer to reach the health check port.

  • How do you keep a user logged in when requests can land on any instance?

    Make the app stateless and store session state externally (a shared cache or token), or use sticky sessions as a fallback, but stickiness reduces even distribution and reintroduces an instance dependency.

What the interviewer is listening for

  • Names health checks as the availability mechanism
  • Notes you need two or more healthy instances
  • Lists failure modes the load balancer cannot fix

What sinks the answer

  • Equates load balancing with raw speed only
  • Thinks one instance behind a load balancer is highly available
  • Cannot name anything a load balancer fails to solve

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

A load balancer spreads requests across [multiple instances] and uses [health checks] to pull unhealthy ones from rotation. That only helps if I have [two or more healthy instances]. It does not fix [a shared database outage, a bad deploy on every instance, or a region failure].

Keep going with architecture & design

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free