In 'SortedFixed' load balancing strategy requests are routed to same host, others are used only in case of failover. Order of hosts to try is determined by instance id.
Note: Order of hosts to try is the same for all instances of LoadBalancedPool.
newInstanceList.Swap(i, randIdx) } case LBSortedFixed: // In SortedFixed strategy, InstanceList is a sorted list, sorted by instanceId. sort.Sort(newInstanceList)
instanceIdx := atomic.AddUint64(&pool.instanceIdx, 1) idx = int(instanceIdx % uint64(len(pool.instanceList))) case LBSortedFixed: // In SortedFixed strategy instances are always traversed in same // exact order.