How is it possible to balance load through one proxy?

After reading about proxies, reverse proxies and load balancing I am left with a question: how is it possible to balance load (via a proxy) if all traffic still has to go through one point - the proxy?

What I understood is the concept that a proxy can distribute requests to different servers. For a client it seems like all the responses come from the proxy. But if all the responses still have to go through the proxy in the end, how does this help so much? The proxy needs to have the capacity off all the servers behind it combined! I am probably missing something..

One of the discussions I am referring to is: Difference between proxy server and reverse proxy server


Well, the load-balancing proxy only performs very simple tasks like rolling a virtual dice to pick one of the servers behind it. These tasks should take a negligible time to complete so that the throughput of the proxy was as high as possible.

On the other hand the servers that handle actual users' requests perform many complex tasks (connect to and query the database, parse data, prepare response) which take longer time, therefore their load is higher and the throughput is significantly lower.

Of course, the load-balancing isn't as simple as that, you can't just pick random numbers as you need to deal with back-end servers' downtimes for example, the point is that the tasks on a load balancer should take much much shorter time than tasks on the servers behind. :-)

链接地址: http://www.djcxy.com/p/96436.html

上一篇: 通过转发代理到达apache zeppelin

下一篇: 如何通过一个代理平衡负载?