标签:splay fun ret img weight load bottom ble round
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
}
标签:splay fun ret img weight load bottom ble round
原文地址:https://www.cnblogs.com/hualou/p/12070718.html