[英]How to manage load balancing
There are 10
servers of a particular organization . 特定组织有
10
台服务器 。 Give some load-balancing algorithm for it. 为它提供一些负载平衡算法 。 Also consider a case where 1 of the server takes 10 sec to process a request and other takes only 1 sec.
还要考虑这样一种情况,其中1个服务器需要10秒来处理请求而其他服务器只需要1秒。 So, how will you manage this bottleneck ?
那么,您将如何管理这个瓶颈 ?
There are several ways of doing so but one of the best way is LOAD BALANCING BY COST . 有几种方法可以这样做,但最好的方法之一是按成本加载平衡 。 In this type of balancing we assign a cost to each connection from client to server on the basis of the
distance
between them, policies of sub-networks between them, medium of data transmission between them etc. and after doing so we try to relocate/refer the connections to that server which gives the overall minimum cost of the connections. 在这种类型的平衡中,我们根据客户端到服务器之间的
distance
,它们之间的子网络策略,它们之间的数据传输介质等为每个连接分配成本,并且在这样做之后我们尝试重新定位/引用与该服务器的连接,它给出了连接的总体最低成本。
May be a simple solution is: Out of every 10 tasks, assign the 1st one to the server that takes 10 sec. 可能是一个简单的解决方案:在每10个任务中,将第1个任务分配给需要10秒的服务器。 The next 9 tasks goes to the server that takes 1 sec.
接下来的9个任务进入服务器需要1秒。
Of course, here I assume tasks are coming in at 1 sec intervals as an assumption. 当然,在这里我假设任务以1秒的间隔进行作为假设。 With that assumption and above approach both the servers are fully utilized.
通过该假设和上述方法,两个服务器都得到了充分利用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.