Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up retrying of failed external link checks #83

Merged
merged 3 commits into from
Aug 8, 2014

Conversation

aroben
Copy link
Contributor

@aroben aroben commented Aug 8, 2014

We retry external link checks in a few situations (e.g., to see if the server supports GET but not HEAD). But we were performing these retries in a blocking manner. We now put the retries into the Typhoeus::Hydra queue just like all the other requests, so they can be performed in parallel. This speeds up checking 62 links on a server that does not support HEAD from 20 seconds to 4 seconds on my machine.

We retry external link checks in a few situations (e.g., to see if the
server supports GET but not HEAD). But we were performing these retries
in a blocking manner. We now put the retries into the Typhoeus::Hydra
queue just like all the other requests, so they can be performed in
parallel. This speeds up checking 62 links on a server that does not
support HEAD from 20 seconds to 4 seconds on my machine.
@gjtorikian
Copy link
Owner

I was about to question this, but it's true! I can't believe our Help site doesn't accept HEAD requests:

$ curl -i -X HEAD https://help.github.com/articles/fork-a-repo
HTTP/1.1 404 Not Found
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Date: Fri, 08 Aug 2014 17:00:15 GMT
Set-Cookie: _help_session=....-0000; secure; HttpOnly
Status: 404 Not Found
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Request-Id: 733c986c-c4f6-4e3d-887d-ee798483bfe5
X-Runtime: 0.009595
X-Xss-Protection: 1; mode=block
Connection: keep-alive

gjtorikian added a commit that referenced this pull request Aug 8, 2014
Speed up retrying of failed external link checks
@gjtorikian gjtorikian merged commit a39655a into gjtorikian:master Aug 8, 2014
@aroben aroben deleted the faster-link-retries branch August 8, 2014 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants