code: public function buildSlotMap()
      {
          $this->slotmap->reset();
  
          foreach ($this->pool as $connectionID => $connection) {
              $parameters = $connection->getParameters();
  
              if (!isset($parameters->slots)) {
                  continue;
              }
  
              foreach (explode(',', $parameters->slots) as $slotRange) {
                  $slots = explode('-', $slotRange, 2);
  
                  if (!isset($slots[1])) {
                      $slots[1] = $slots[0];
                  }
  
                  $this->slotmap->setSlots($slots[0], $slots[1], $connectionID);
              }
          }
      }
docs: Generates the current slots map by guessing the cluster configuration out
  of the connection parameters of the connections in the pool.
  
  Generation is based on the same algorithm used by Redis to generate the
  cluster, so it is most effective when all of the connections supplied on
  initialization have the "slots" parameter properly set accordingly to the
  current cluster configuration.