-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support direct HTTP retrieval from /https providers #125
Comments
Before continuing, I want to lay down some notes to make sure we're all on the same page about what needs to be done and about the current challenges with accepting the Most providers with HTTPS multiaddresses are unusableMost, if not all, providers advertising {
"Addrs": ["/dns4/dag.w3s.link/tcp/443/https"],
"ID": "QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp",
"Metadata": "oBIA",
"Protocol": "transport-ipfs-gateway-http",
"Schema": "unknown"
}, We should be getting this: {
"Schema": "peer",
"ID": "QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp",
"Addrs": ["/dns4/dag.w3s.link/tcp/443/https"],
"Protocols": ["transport-ipfs-gateway-http"]
} As I said, the code can be hammered to accept this (albeit a bit harder in Go). But I would rather not go that avenue. We already have plans of completely removing support for Fetching the block via HTTPSThe current flow to fetch a block, from the Blockservice perspective, is as follows:
I see a few ways of potentially solving this. (a) Parallel ExchangesCreate a parallel exchange that calls both Bitswap and a new exchange that can take advantage of the Delegated Routing endpoint results that have non-Bitswap peers. Challenges I see:
(b) Smarter ExchangeAn exchange where you can register sub-exchanges (or fetchers) for certain protocol types. This exchange would call Challenges I see:
(b) seems technically more complicated (at least without looking at what is currently possible), but likely better to save duplicated HTTP requests and resources. We can also probably reuse the new |
Triage:
|
Update:
|
Something we could try, without changing too much, without touching higher level abstractions like exchanges, is doing opportunistic HTTP fetch in Wrote initial thoughts in ipfs/boxo#608 – pinged some folks, looking for feasibility feedback. |
This is GO version of ipfs/service-worker-gateway#72.
We want rainbow to benefit from
/https
providers (example) and use them in addition to bitswapIdeally, we would be prioritizing HTTP retrieval over bitswap, where possible, as it lowers the cost of content providers, and incentivizes them to configure, expose, and announce HTTPS endpoints.
MVP scope
Focus should be on block (application/vnd.ipld.raw,
?format=raw
) requests, as these will always work, across all implementations, and provide the best cachability for HTTP infrastructure we have.CAR with IPIP-402 may be more involved, and may lead to duplicated block retrievals due to the way loading a page with a dozen of subresources works (all share the same parent, all fetched in parallel, may lead to racy case where parent blocks are fetched multiple times, slowing down page loads)
The text was updated successfully, but these errors were encountered: