Question about content delivery

Hi guys,
I’m developing a full decentralized website for my final project in IT Engineering using IPFS-Ethereum-BigchainDB.
I’ve finished the coding part and now I’m writing the theorical one, in general I think that I have understood the key concepts of all the components used. There is only one point I am wondering about, that I could not find well explained anywhere, so here is the question:
when a common user that has no ipfs running on his computer visits my website, does he becomes a peer that delivers my content? Or only someone that has installed ipfs becomes a peer?

Only someone running an IPFS node can be a peer that delivers your content. By default, content in IPFS that they access through their node is then provided by them until it’s garbage collected. However, they can pin it to prevent it from becoming garbage collected. It’s unclear how someone is accessing your IPFS website, though.

If they’re accessing it through a gateway, then neither the visitor without IPFS nor the visit with IPFS will necessarily become a peer that mirrors your website – unless the user running IPFS is using something like a browser plugin that detects when a site is being hosted on an IPFS gateway and instead loads it over the local gateway.

If your site is hosted in IPFS without a gateway, then I don’t know how a user not running IPFS can view it directly; I think the only way is if they manually use someone else’s gateway to view it. In this scenario, someone running IPFS and accessing your website through their local IPFS gateway will become a peer that can provide your content.

Ok thank you for clearing that. I’ve read that the motivation because my content is stille available when my node is offline is because the gateway ipfs.io stores It in his cache.
I’ve also read that It is in plan to use ipfs-js in order to let the browsers become (light) nodes, so at least my question is possible that will be implemented.
I’ve another question at this point: the ipfs.io gateway is a single node or a group of nodes?

I was assuming that someone would be loading your site through your own gateway, but you’re right that the ipfs.io gateway will become a provider of the content until it’s garbage collected; the public gateways don’t just cache your content forever for free. I don’t think reliance on a centralized ipfs.io gateway is desired though. My impression of the goal is to eventually not needing gateways at all.

If a user goes to access your IPFS site with a dns text record point to an IPFS hash and the domain name pointed to the IP address of an IPFS gateway (either one of ipfs.io’s or another one), then your site is designed to spin up a js-ipfs node in the browser, then I think they would become a peer. I don’t know what all js-ipfs is currently capable of, though.

I seem to remember reading somewhere that there are multiple nodes behind the ipfs.io gateway. Note that anyone running a go-ipfs node can act as a gateway, though. There’s nothing inherently special about the ipfs.io gateways besides them being the “default” gateways run by the Protocol Labs team.

ipfs.io points to multiple IP addresses so I assume it’s at least a few nodes

ipfs-js makes running a light client in a visitor’s browser possible, but it is still in alpha. IPFS Companion extension also worth looking at

Thank you.
My website is only a prototype that I use as a showcase of the technology in a real use case (a ticketing online service for a subway). So those question are to properly write the theorical part of the project and to be sure to write correct concepts, and also to satisfy my curiosity.
Thank you for this answer.

1 Like