we need to sort the priority for picking the highest priority server