Skill Zuno · skillzunos.com · System Design
Load Balancers interview questions
Prepare for Load Balancers interviews on Skill Zuno. This practice book covers Load Balancers interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open Load Balancers on Skill ZunoAlso see the Load Balancers tutorial.
A load balancer spreads incoming traffic across several servers so no single server is overwhelmed and failed servers are taken out of rotation. Load balancers work at layer 4, routing TCP and UDP connections, or at layer 7, routing HTTP requests by path, header or cookie. Interviews cover algorithms, health checks, session affinity, TLS termination and making the load balancer itself highly available.
Sample Load Balancers interview questions
What is the difference between a layer 4 and a layer 7 load balancer?
A layer 4 balancer forwards TCP or UDP connections based on IP and port and is very fast. A layer 7 balancer understands HTTP, so it can route by path or header, terminate TLS, rewrite requests and retry.
When is least connections better than round robin?
When requests vary a lot in cost or duration, such as long-lived WebSocket connections. Round robin can pile slow requests on one server, while least connections sends new work to the least busy one.
What are sticky sessions and what are their downsides?
Sticky sessions send a client to the same server each time, usually via a cookie. They make load uneven and lose sessions when that server dies; storing sessions in a shared store avoids the need.
How do you avoid the load balancer becoming a single point of failure?
Run at least two balancers with failover through a floating IP or DNS, or use a managed cloud load balancer, which is redundant across zones.
What is connection draining?
When an instance is removed, the load balancer stops sending it new requests but lets in-flight requests finish, so deployments and scale-ins do not drop users' requests.
What you can practice
- Load Balancers interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- System Design topics alongside Load Balancers on skillzunos.com