First choice of replica for given external dictionary should be based on randomness instead of order in configuration file.

const unsigned max_connections_, const size_t max_tries_)
    : PoolWithFailover{
        Poco::Util::Application::instance().config(), config_name_,
        default_connections_, max_connections_, max_tries_}
{
}
PoolWithFailover::PoolWithFailover(const PoolWithFailover & other)
    : max_tries{other.max_tries}, shareable{other.shareable}
{
    if (shareable)
    {
        replicas_by_priority = other.replicas_by_priority;
    }
    else
    {
        for (const auto & priority_replicas : other.replicas_by_priority)
        {
            Replicas replicas;
            replicas.reserve(priority_replicas.second.size());
            for (const auto & pool : priority_replicas.second)
                replicas.emplace_back(std::make_shared<Pool>(*pool));
            replicas_by_priority.emplace(priority_replicas.first, std::move(replicas));
        }
    }
}
PoolWithFailover::Entry PoolWithFailover::get()