@Override
    public boolean equals(Object obj) {
      if (obj instanceof GridProfileId) {
        final GridProfileId other = (GridProfileId) obj;

        if (gp.getPort() == other.gp.getPort()) {
          final String thisHost = gp.getHost();
          final String otherHost = other.gp.getHost();
          if (thisHost != null) {
            if (thisHost.equals(otherHost)) {
              if (getMemberId() != null) {
                return getMemberId().getUniqueId().equals(other.getMemberId().getUniqueId());
              } else {
                return other.getMemberId() == null;
              }
            }
          } else {
            return (otherHost == null);
          }
        }
      }
      return false;
    }
Basic idea is to base id off of host and port of GridProfile
geode-core/src/main/java/org/apache/geode/internal/cache/GridAdvisor.java