func (this *LoadBalance) RoundRobinByWeight3() *HttpServer { //平滑加权轮询
for _, s := range this.Servers {
s.CWeight = s.CWeight + s.Weight
}
sort.Sort(this.Servers)
max := this.Servers[0]
max.CWeight = max.CWeight - SumWeight
return max
}
平滑加权轮询算法下的降权
猜你喜欢
转载自www.cnblogs.com/hualou/p/12070718.html
今日推荐
周排行