@Override
        protected Connection chooseConnection(final RequestMessage msg) throws TimeoutException, ConnectionException {
            final Iterator<Host> possibleHosts = this.cluster.loadBalancingStrategy().select(msg);

            // try a random host if none are marked available. maybe it will reconnect in the meantime. better than
            // going straight to a fast NoHostAvailableException as was the case in versions 3.5.4 and earlier
            final Host bestHost = possibleHosts.hasNext() ? possibleHosts.next() : chooseRandomHost();
            final ConnectionPool pool = hostConnectionPools.get(bestHost);
            return pool.borrowConnection(cluster.connectionPoolSettings().maxWaitForConnection, TimeUnit.MILLISECONDS);
        }
Uses a {@link LoadBalancingStrategy} to choose the best {@link Host} and then selects the best connection
from that host's connection pool.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java