Reliability-and capacity-based selection in distributed hash tables