protected boolean isWithinConnectionLimit(Promise<PooledConnection> promise) {
        // Enforce MaxConnectionsPerHost config.
        int maxConnectionsPerHost = config.maxConnectionsPerHost();
        int openAndOpeningConnectionCount = server.getOpenConnectionsCount() + connCreationsInProgress.get();
        if (maxConnectionsPerHost != -1 && openAndOpeningConnectionCount >= maxConnectionsPerHost) {
            maxConnsPerHostExceededCounter.increment();
            promise.setFailure(new OriginConnectException(
                    "maxConnectionsPerHost=" + maxConnectionsPerHost + ", connectionsPerHost="
                            + openAndOpeningConnectionCount,
                    OutboundErrorType.ORIGIN_SERVER_MAX_CONNS));
            LOG.warn(
                    "Unable to create new connection because at MaxConnectionsPerHost! maxConnectionsPerHost={},"
                            + " connectionsPerHost={}, host={}origin={}",
                    maxConnectionsPerHost,
                    openAndOpeningConnectionCount,
                    server.getServerId(),
                    config.getOriginName());
            return false;
        }
        return true;
    }
function to run when a connection is acquired before returning it to caller.
zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java