public synchronized ServerLocation getServerForConnection(String group,
      Set<ServerLocation> excludedServers) {
    if ("".equals(group)) {
      group = null;
    }

    Map<ServerLocationAndMemberId, LoadHolder> groupServers = connectionLoadMap.get(group);
    if (groupServers == null || groupServers.isEmpty()) {
      return null;
    }

    {
      List<LoadHolder> bestLHs = findBestServers(groupServers, excludedServers, 1);
      if (bestLHs.isEmpty()) {
        return null;
      }
      LoadHolder lh = bestLHs.get(0);
      lh.incConnections();
      return lh.getLocation();
    }
  }
Pick the least loaded server in the given group

@param group the group, or null or "" if the client has no server group.
@param excludedServers a list of servers to exclude as choices
@return the least loaded server, or null if there are no servers that aren't excluded.
geode-core/src/main/java/org/apache/geode/distributed/internal/LocatorLoadSnapshot.java