← Module 07 · System Architecture

MODULE 07 · SYSTEM ARCHITECTURE

Load Balancer

A load balancer distributes incoming traffic across healthy servers or application instances.

01 · What is it?

What is it?

A load balancer receives traffic and chooses a healthy server to handle each request.

It sits in front of multiple servers or application instances. By spreading requests instead of sending everything to one machine, it helps a product stay responsive and available as demand changes.

Users and clients Load balancer Healthy app instances
02 · Think of it like...

Think of it like...

Think of a load balancer like a restaurant host who sends arriving guests to open tables.

The host does not cook the food. The host watches which tables are available, avoids sending guests to a closed table, and keeps one table from receiving every group. The servers do the actual application work.

Arriving guestsRestaurant hostOpen tables
03 · What does it do?

What does it do?

A load balancer turns a group of servers into one dependable destination for callers.

Distribute requests

Spread traffic across available servers so work is shared.

Check health

Use health checks to stop routing traffic to an instance that cannot serve correctly.

Use routing rules

Choose a method such as round robin, least connections, or weighted routing.

Absorb demand

Give a service room to handle more concurrent requests than one server could handle.

Support failover

Keep requests moving when one instance becomes unhealthy or unavailable.

Hide server details

Let clients call one stable address instead of knowing every backend instance.

04 · Where is it used?

Where is it used?

Web applications

Route browser traffic across several copies of the web or application tier.

Public APIs

Keep a stable API address while backend capacity grows behind it.

Microservices

Send requests to healthy instances of a service such as checkout or search.

High-traffic launches

Spread a campaign or sale surge across a prepared pool of instances.

Multi-zone systems

Route around an unhealthy availability zone when the design supports it.

Internal platforms

Balance traffic between workers, inference servers, or other internal services.

05 · Example

Example

Imagine an online retailer launching a limited-time sale.

Many shoppers Load balancer Checkout 1 · 2 · 3 Order service and database

Before the sale

The team runs several checkout instances and configures health checks. The load balancer has one public checkout address.

During the sale

Requests are spread across healthy instances. If Checkout 2 fails its health check, new requests go to Checkout 1 or 3.

The load balancer improves the request path, but it does not make a database unlimited. The checkout service and its data layer still need capacity and protection.

06 · How it connects

How it connects

DNS / API Gateway Load balancer Service instances Database / cache

The load balancer is a traffic-distribution layer. It can work behind a DNS name or API gateway, and it can sit in front of services that use databases, caches, or queues.

PM Perspective: Ask what is being balanced, what counts as healthy, what happens when capacity is exhausted, and which user-facing promise the design protects: availability, response time, or both.
07 · Do Not Confuse

Do Not Confuse

Load Balancer ≠ API Gateway

Load balancer: mainly distributes traffic across healthy instances. API Gateway: manages an API entry boundary with policies such as authentication, rate limiting, and request routing.

Load Balancer ≠ Autoscaling

Load balancer: chooses where requests go. Autoscaling: adds or removes instances. They often work together but solve different problems.

Load Balancer ≠ CDN

Load balancer: sends a request to an application server. CDN: serves cached content from edge locations closer to users.

Load Balancer ≠ Health Check

Load balancer: makes the routing decision. Health check: supplies a signal about whether an instance should receive traffic.

08 · Topic Glossary

Topic Glossary

ENGLISH TERM中文SIMPLE ENGLISH中文小白理解
Load Balancer负载均衡器A component that distributes incoming traffic across healthy servers.把进入系统的请求分配给健康服务器的组件。
Traffic流量Requests and data moving through a system.在系统中流动的请求和数据。
Server Instance服务器实例One running copy of an application or service.正在运行的一份应用或服务副本。
Health Check健康检查A test that indicates whether an instance can serve traffic.判断某个实例能不能继续接收请求的测试。
Round Robin轮询A rule that sends requests to instances in repeating order.按顺序轮流把请求发给不同实例。
Least Connections最少连接A rule that prefers the instance with fewer active connections.优先把请求给当前连接数较少的实例。
Failover故障切换Moving work to a healthy alternative after a failure.出故障后把工作转移到可用的备用路径。
Horizontal Scaling水平扩展Adding more instances to handle more work.增加更多实例来处理更多工作。
Availability可用性How consistently a service is reachable and usable.服务能否持续被访问和使用。
Backend后端The server-side software that handles application work.在服务器端处理应用业务的软件部分。
09 · What to Remember

What to Remember

A load balancer gives one stable entry point a way to distribute requests across healthy application instances.

It is a traffic and availability tool—not a replacement for capacity planning, autoscaling, caching, or a resilient data layer.

↑