public Move findBestRemove(Bucket bucket) {
    float mostLoaded = Float.MIN_VALUE;
    Move bestMove = null;
    Set<Member> members = bucket.getMembersHosting();
    // Check to see if we have a preferred redundancy zone to delete from for this bucket.
    // We prefer deleting copies in the same redundancy zone
    Set<String> zones = getPreferredDeletionZone(members);

    for (Member member : members) {

      // if this load is lower than then highest load, we prefer the deleting from high
      // load servers so move on. If this member is the bucket primary, we prefer not to move
      // primaries, so move on.
      float newLoad = (member.getTotalLoad() - bucket.getLoad()) / member.getWeight();
      if (newLoad <= mostLoaded || member.equals(bucket.getPrimary())) {
        continue;
      }

      // if we have a preferred redundancy zone to delete from
      if (!zones.isEmpty()) {
        // leave the bucket on this member whose zone is not in the list
        if (!zones.contains(getRedundancyZone(member.getMemberId()))) {
          continue;
        }
      }

      // Since this bucket is an extra copy for the zone, we should remove it.
      // if the attemptedBucketRemovesList contains this move, then we don't need to add it
      // again.
      Move move = new Move(null, member, bucket);
      if (attemptedBucketRemoves.contains(move)) {
        continue;
      }

      mostLoaded = newLoad;
      bestMove = move;
    }
    return bestMove;
  }
Find the best member to remove a bucket from

@param bucket the bucket we want to create
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/PartitionedRegionLoadModel.java