@Override
    public boolean shouldBackoff(final HttpResponse response) {
        return response.getCode() == HttpStatus.SC_TOO_MANY_REQUESTS ||
            response.getCode() == HttpStatus.SC_SERVICE_UNAVAILABLE;
    }
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