Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Nice useful timeouts #5

Open
6 tasks
ghost opened this issue Nov 4, 2016 · 1 comment
Open
6 tasks

Nice useful timeouts #5

ghost opened this issue Nov 4, 2016 · 1 comment
Labels
kind/enhancement A net-new feature or an improvement to an existing feature

Comments

@ghost
Copy link

ghost commented Nov 4, 2016

Note: I'm only talking about /ipfs and /ipns paths on the gateway here, not about /api.

Currently there are hardcoded timeouts of 1 hour in the gateway, and 30 minutes in the nginx reverse-proxy on ipfs.io. If the gateway's underlying ipfs node can't serve the file/directory from its own dagstore, it'll use bitswap to find and fetch it. The request will hang and wait until the data has been fetched. If one of the timeouts is reached, the response will be a cryptic error ("context deadline exceeded" and "504 Gateway Timeout", resp.)

We can make this condition a lot more useful.

  • Low request timeout in the gateway, something like 30 seconds
  • A timeout response page with:
    • "This is what might be wrong"
    • UI for retrying, and setting ?timeout query parameter, one-shot or permanently
    • Automatic polling for the requested object (via /api), with progress feedback, offer to reload when finished
    • UI for contextual debugging, e.g. dht findprovs/findpeer, name resolve, wantlist, etc. (via /api)

Basically like a search form on a 404 page, but way cooler.

@ghost
Copy link
Author

ghost commented Nov 4, 2016

To further improve NAT traversal debugging, we could probably have the 504 page exploit CSRF vulnerabilities in plenty of home routers to check the model against a list of known-bad devices (regarding NAT traversal). Just kidding :)

@ghost ghost added the kind/enhancement A net-new feature or an improvement to an existing feature label Nov 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement A net-new feature or an improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

0 participants