default boolean ping(ClickHouseNode server, int timeout) {
        if (server != null) {
            if (timeout < 1) {
                timeout = server.config.getConnectionTimeout();
            }
            if (server.getProtocol() == ClickHouseProtocol.ANY) {
                server = ClickHouseNode.probe(server.getHost(), server.getPort(), timeout);
            }
            // Request to this specific ClickHouse node
            ClickHouseRequest<?> request = new ClickHouseRequest<>(this, server, new AtomicReference<>(server), server.config.getAllOptions(), false);
            try (ClickHouseResponse resp = request
                    .option(ClickHouseClientOption.ASYNC, false) // use current thread
                    .option(ClickHouseClientOption.CONNECTION_TIMEOUT, timeout)
                    .option(ClickHouseClientOption.SOCKET_TIMEOUT, timeout)
                    .option(ClickHouseClientOption.MAX_QUEUED_BUFFERS, 1) // enough with only one buffer
                    .format(ClickHouseFormat.TabSeparated)
                    .query("SELECT 1 FORMAT TabSeparated").execute()
                    .get(timeout, TimeUnit.MILLISECONDS)) {
                return resp != null;
            } catch (Exception e) {
                LOG.debug("Failed to connect to the server", e);
                return false;
            }
        }

        return false;
    }
Tests if the given server is alive or not. It always returns {@code false}
when server is {@code null} or timeout is less than one. Pay attention that
it's a synchronous call with minimum overhead(e.g. tiny buffer, no
compression and no deserialization etc).

@param server  non-null server to test
@param timeout timeout in millisecond, should be greater than zero
@return true if the server is alive; false otherwise
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClient.java