protected function getRandomSlave($fallbackToMaster = true)
    {
        $slaves = $this->client->getConnection()->getSlaves();

        if (count($slaves) > 0) {
            $slave = $slaves[rand(1, count($slaves)) - 1];

            return $this->client->getClientFor($slave->getParameters()->alias);
        }

        if ($fallbackToMaster) {
            return $this->getMaster();
        }

        throw new RuntimeException('No slave present on connection.');
    }