寻找负载最少的服务器
给定三台服务器 A、B、C,其中 A 可以处理 50% 的流量,B 可以处理 30% 的流量,C 可以处理 20% 的流量,提出一个有效分配负载的公式。服务器的当前负载也是该函数的输入。
我无法想出他所要求的“公式”。这个问题有具体的答案吗?
Given three servers which A , B , C in which A can handle 50% of the traffic , B can handle 30% of the traffic and C can handle 20% of the traffic come up with a formula to distribute load efficiently. The current load of the servers is also an input to the function.
I could not come up with the "formula" he is asking for. Is there any specific answer to this question ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有几种不同的负载分配方法可能适用于此。
情况 1. 与每个服务器负载成比例的随机分配:
情况 2. 与每个服务器负载成比例的循环分配:
情况 3. 忘记假定的容量并轮询当前负载
There are a few different ways to distribute load that might be applicable here.
Case 1. Random assignment biased proportionally to each servers load:
Case 2. Round-Robin biased proportionally to each servers load:
Case 3. Forget about the supposed capacity and poll for current load
基本上,计算每个服务器上的服务相对成本,并在某个小的固定时间内,将发送到所述服务器的请求的总成本相加。像这样的东西:
Basically, compute a relative cost to serve on each of the servers, and over some small fixed period, sum the total cost of the requests sent to said server. Something like: