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

feat: dotstorage hosts resolution layer #105

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Oct 17, 2022

This PR adds to the dotstorage cdn resolution an array of CDN Gateways Race. This enables us to include freeway as part of our resolution before hitting first tier of IPFS gateways race.

Needs:

  • freeway ready

@vasco-santos vasco-santos force-pushed the feat/dotstorage-hosts-resolution-layer branch from afbd53c to e6f6207 Compare October 17, 2022 09:22
@@ -202,8 +204,24 @@ async function getFromDotstorage (request, cid, options = {}) {
response,
resolutionIdentifier: host
}
}),
...env.cdnGateways.map(async (host) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not added as a GatewayRacer instance yet, but should be added in follow up.

At the moment, we have as part of this step (dotstorage cdn layer) performing requests to only if cached gateways (nftstorage.link asks w3s.link cache, and other way around). This means part of this race requires different headers, as well as non path resolution.

To use gateway racer now, we would need to add support there to specify headers per gateway target and to support path+subdomain resolution. This might not be needed, because we might go with CF Cache Reserve + custom hostname for nftstorage.link which would mean the onlyIfCachedHosts would not be needed anymore.

@alanshaw
Copy link
Member

@vasco-santos freeway is ready and deployed to production. We just need NFT.Storage to write to R2 and for the indexes to also be written. It can be added to the race now.

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