We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Load Balancing Proxies
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Load Balancing Proxies
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
Every rule so far in this chapter ends with one answer. A path matches one backend. A weight picks one. A failover uses one until something says otherwise.
Multi-value routing ends with several, and lets the client decide.

Handing over several options moves the load spreading, the retrying and the failure handling out of your infrastructure and into somebody else's client.
That is the trade. You get client-side resilience for free, and you give up any ability to say what happens, because the algorithm lives in code you did not write and cannot deploy.
So the useful question is what clients actually do.

Client-side failover works. What varies by three orders of magnitude is the price.

The client did the right thing in all three cases. The wait is its connect timeout.

Client-side failover is quick when the dead address says so, and as slow as the connect timeout when it says nothing.

The client's behaviour is fixed. What varies is the signal your infrastructure gives it, and some of that is a choice you make in a firewall rule.
The firewall row is actionable today. A rule that rejects gives every client a fast, correct signal; a rule that drops makes every client wait. Dropping is the right default facing the internet and the wrong one facing your own clients.

This chart is arithmetic, not a measurement. The measured point is in the capture above: one silent address cost 5,009.8 milliseconds.
The default connect timeout in most libraries assumes an unreliable public network and a patient user. Inside a data centre, where a healthy connect takes under a millisecond, a two second timeout is already a thousand times the expected value and is generous.

The algorithm has a name and a specification, and it is why a dead address is invisible on the web and expensive everywhere else.
Check whether your own clients do this before relying on multi-value routing for failover. Browsers do. Many server-side libraries try one address, wait for the whole connect timeout, and only then try the next.