V
V
Vi2015-03-27 19:56:43
System administration
Vi, 2015-03-27 19:56:43

How is load balancing achieved?

If we take an example of any of the services, "Yahoo", "Google", "Instagram", "Vk"
What mechanisms are used for load balancing (besides DNS)
How does the same search engine manage to answer a million clients per second, if not more

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
throughtheether, 2015-03-29
@redsabien

To begin with, I would like to note that, in my opinion, it seems logical to separate the concepts of load balancing and load sharing. In short, load balancing implies some kind of feedback (the lower the load of the server, for example, the more likely it is that the next request will be processed by it), as opposed to load sharing.
Let's take a superficial look at how the client interacts with the web service. The client accesses a certain URL, the domain name is resolved to an IP address (moment 1). Next, you need to establish a TCP session with the host represented by this address (point 2). To do this, IP packets containing TCP segments must reach this host (time 3). After the TCP session is established, HTTP messages are exchanged in it (moment 4).
At point (1), both splitting (DNS round-robin) and load balancing (specific DNS solutions that monitor server performance metrics) are possible. At point (2), load balancing/sharing is possible using NAT or TCP proxying. At point (3), load sharing is possible using BGP anycast, equal-cost multipath, or CARP/VRRP (in descending order of architectural abstraction, so to speak). At point (4), load balancing/sharing is possible using a reverse proxy.
The same model is partially applicable when, say, a web server interacts with a database server, and so on.
Approximately in this way, you can distribute the load on a large number of servers. But it is necessary to understand that in this case, depending on the scope, a number of other tasks arise, such as, in particular, the consistency of the state of the servers.

V
Vadim Shandrinov, 2015-03-27
@suguby

There are different strategies. The simplest is a cluster of fronts that have a lot of memory and everything is cached + several application servers + several DBMS servers. And requests go to the fronts in round-robbin (along the ring) on ​​the incoming router. For the communication bus of the fronts with the application servers, something like haproxy is used.
But everything strongly depends on the functionality, whether it is possible to shard databases, how well responses are cached, etc.
Entire conferences are held on the "how" of HighLoad, for example, read the materials.

S
Sergey Petrikov, 2015-03-27
@RicoX

Google for the word CDN and read everything you find in the search, on the third or fourth article, understanding and options will begin to come. At the same Google, all major providers have special servers with a cache, it gives them for free, so most of the end subscribers receive their requests from caches from the servers of the provider or backbone, and there are a lot of scaling options, for short queries like DNS, this a thing like anycast, in general, the topic is very extensive.

V
Vlad Zhivotnev, 2015-03-28
@inkvizitor68sl

https://events.yandex.ru/lib/talks/379/ - they remembered about Yandex, they could find this entry =)
About the balancers in the video, behind the balancers are application servers, which have daughters, which are the same.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question