Load Balancer Placement in Architecture
What you'll learn: Where load balancers fit into your system's structure and why their position matters.
The Core Idea
Load balancers don't just sit in one place—they can be strategically placed at multiple levels of your architecture. The two most common placements are:
- Client-to-Server (External): Between end users and your application servers
- Service-to-Service (Internal): Between different backend services within your system
Think of load balancers like traffic directors at different intersections in a city. You need one at the main entrance where visitors arrive, but you might also need them at internal crossroads where delivery trucks move between warehouses.
Client-to-Server Placement
This is the "front door" load balancer. When users access your website or app, they hit this load balancer first. It distributes incoming requests across your fleet of web servers or API servers. This is what most people picture when they think of load balancing.
Example: A user visits yourapp.com → DNS resolves to the load balancer → load balancer picks one of 10 web servers.
Service-to-Service Placement
Modern systems aren't monolithic—they're built from multiple services talking to each other. Internal load balancers sit between these services. For instance, your web server might need to call an authentication service, and that call goes through an internal load balancer distributing work across multiple authentication servers.
Example: Web Server → Internal Load Balancer → One of 5 Authentication Service Instances
This pattern becomes essential as you horizontally scale individual services independently.
Key Takeaway: Load balancers can be placed externally (handling user traffic) and internally (distributing work between backend services), creating multiple layers of traffic distribution in a scaled architecture.