We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
4 system design questions lean on this idea. Each walks through the full answer.
System Design Masterclass · Load Balancing Proxies
Free preview: the first 2 parts of this 11-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”
Everything in this chapter so far has balanced traffic inside one place. A picks a server. A gateway picks a service. Both make a choice and the choice takes effect immediately, because the thing making it sits directly in the path of the request.
Global server load balancing is the first mechanism in this chapter that does not sit in the path. It decides which data centre you should reach, and then it has to tell you, and the telling is the whole subject of this lesson.

There are two ways to steer a user to a region. One answers a question differently depending on who asked. The other publishes one address from many places and lets the internet work out which is nearest. The rest of this lesson is about the difference between them, because that difference decides how long a failover takes.
Most descriptions of GSLB stop at the left-hand column and present the as a dial. Turn it down, they say, and traffic moves faster. That sentence is the reason this lesson exists, because the TTL is not a dial. It is a request, sent to tens of thousands of caches that you do not own, cannot list, and have no way to flush.
Before measuring anything, it is worth being precise about what comes out of a GSLB. All the health checking and policy evaluation in the world eventually has to be expressed in a answer, and a DNS answer is a very small thing.

Read the fields and notice what is missing. There is no field that means revoke this. There is no field that means check back if anything changes. There is no field that records why this address was chosen or who it was chosen for. A GSLB makes a rich decision and then expresses it in a format that can carry almost none of it.
The decision itself is genuinely sophisticated. A GSLB evaluates health, capacity and policy on every query, thousands of times a second.

Follow the branches and they are all sensible. Health first, then capacity so that a failover does not flatten the region it fails over to, then policy for the order regions are tried in. Then the answer leaves, and from that moment the system has no way to correct it.
This is the shape of the whole problem. The control plane is fast. The delivery of its decisions is not.