Explain the concept of 'Server Affinity' or 'Sticky Sessions'.

Updated Apr 28, 2026

Short answer

A method to route all requests from a specific user to the same backend server for the duration of a session.

Deep explanation

Load balancing is critical for horizontal scaling. By sitting in front of a server farm, it ensures no single server becomes a bottleneck. It also provides high availability; if one server fails, the LB stops sending traffic to it until it recovers.

Real-world example

A small website using Nginx to split traffic between two identical web servers.

Common mistakes

  • Forgetting to configure health checks, causing the LB to send traffic to crashed servers.

Follow-up questions

  • What is a reverse proxy?

More Load Balancing interview questions

View all →