code: public static List<String> getServiceUrlsFromConfig(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone) {
          List<String> orderedUrls = new ArrayList<String>();
          String region = getRegion(clientConfig);
          String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion());
          if (availZones == null || availZones.length == 0) {
              availZones = new String[1];
              availZones[0] = DEFAULT_ZONE;
          }
          logger.debug("The availability zone for the given region {} are {}", region, availZones);
          int myZoneOffset = getZoneOffset(instanceZone, preferSameZone, availZones);
  
          List<String> serviceUrls = clientConfig.getEurekaServerServiceUrls(availZones[myZoneOffset]);
          if (serviceUrls != null) {
              orderedUrls.addAll(serviceUrls);
          }
          int currentOffset = myZoneOffset == (availZones.length - 1) ? 0 : (myZoneOffset + 1);
          while (currentOffset != myZoneOffset) {
              serviceUrls = clientConfig.getEurekaServerServiceUrls(availZones[currentOffset]);
              if (serviceUrls != null) {
                  orderedUrls.addAll(serviceUrls);
              }
              if (currentOffset == (availZones.length - 1)) {
                  currentOffset = 0;
              } else {
                  currentOffset++;
              }
          }
  
          if (orderedUrls.size() < 1) {
              throw new IllegalArgumentException("DiscoveryClient: invalid serviceUrl specified!");
          }
          return orderedUrls;
      }
docs: Get the list of all eureka service urls from properties file for the eureka client to talk to.
  
  @param clientConfig the clientConfig to use
  @param instanceZone The zone in which the client resides
  @param preferSameZone true if we have to prefer the same zone as the client, false otherwise
  @return The list of all eureka service urls for the eureka client to talk to