@Override
    public boolean shouldBackoff(final Throwable t) {
        return t instanceof SocketTimeoutException || t instanceof ConnectException;
    }
This {@link ConnectionBackoffStrategy} backs off either for a raw
network socket or connection timeout or if the server explicitly
sends a 429 (Too Many Requests) or a 503 (Service Unavailable) response.

@since 4.2
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/DefaultBackoffStrategy.java