Skip to content
StackDecode
System Design
8. Load Balancing and ScalabilityAnimated

Least Response Time

Send to the fastest responding server.

The idea

Combines response time with connection count to pick the best server now.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

10.0.0.4Load balancerServer 11 totalServer 20 totalServer 30 total
  • chosen path
  • active connections (bar)

Request 1 goes to server 1: lowest expected response time (fast server and short queue).

request:
1
server:
1
1/14

The white bar inside each server is its current number of active connections.

Step by step

  1. 1Measure response time
  2. 2Combine with active connections
  3. 3Choose the best
  4. 4Keep measuring

Where it is used

Heterogeneous backends.

Watch out for

Measurement noise can cause herding.

Related