How it works! - storage hosting

I’m trying to understand the basic idea. I still have no clue how ipfs node going to replace storage hosting.

  1. If I run an ipfs daemon to broadcast my file, will it download/serve files from other nodes too?
  2. It mention about CDN. Is it possible for a node to become so huge because of serving files across the globe? if not then a request to get a content still need to hop across continent am I right?
  3. How about the high availability? I saw a topic about a file get garbage collected if ipfs daemon is not running.
  4. How a node being incentiviced for running CPU and storage or is it a volunteer basis?

If it just like BitTorrent, then no one interested to serve my public file until I rent some storage hosting in a few locations. So it seems like back to basic.

1 Like

I might be able to answer that to some extent, but others with more insight should also weigh in.

  1. Afaik, in addition to the files you add & pin yourself, and the ones you access/cat (and thereby cache), the node will download & cache parts of other files from the network, but I don’t know the criteria the node uses to cache files, if it’s random, or if it’s meant to be part of a system that tries to distribute as much ipfs content as possible & as evenly as possible. (?)

  2. Imho it would be logical that nodes would become bigger in relation to the growing network; the bigger the network, the more files are seeded, the bigger an individual node can become; if I remember correctly, future updates will let users limit the local storage capacity & download/upload speed. Since normal internet users don’t have as much storage space, and are not online all the time, a lot of content needs to be hosted elsewhere to become “distributed”. But as for accessing content, you need to get it from the network anyway, all the time, and if it’s some obscure file not a lot of people want, or an old version of a webpage etc., chances are that nodes geographically close to your own don’t have it, so you’ll need to get it from further afar, or from some dedicated ipfs archive storage node.

  3. If a file isn’t hosted in full by any node anymore, i.e. if it isn’t pinned anywhere, it makes sense that chunks of the file that are still cached on other nodes, get garbage collected. So if all the nodes that have pinned a file are disabled, then the network would think that nobody has pinned the file anymore. (But I’m not sure if that’s how it works.) At any rate, garbage collection won’t happen immediately because the default daemon is enabled without garbage collection, unless you use the option --enable-gc, so normally you would have to run ipfs repo gc manually. In my view auto-garbage-collection only makes sense for gateways with heavy traffic. For normal users this would only make sense, if they have limited their node’s local storage size, and only when that limit is reached, then ipfs would start collecting (some?) garbage.

  4. At some point there will be Filecoin, i.e. if you offer some local storage, and if you actually receive, pin & serve (continue to serve) other people’s files, then you’ll receive micro-payments in ƒ. But if your node is only running occasionally, that might not be a lot of ƒ, so this system is probably something for nodes on big servers that run 24/7. The normal user (on his normal computer) will probably just run a default ipfs node. And yes, vice versa it means that normal users will be the ones paying for others to store their content, just as they’re doing it now for legacy cloud hosters etc., if they have files that they want to be publicly & permanently available, e.g. a website. Will the Filecoin system allow for some free-of-charge ipfs storage space, e.g. 50 GB, as some current cloud providers offer? I don’t know.

1 Like

Following up on Jay’s response:

(Terminology: ‘block’ = ‘chunk of data’/‘piece of a file’)

  1. In the current implementation, your IPFS daemon will not download files that you don’t explicitly request. However, a full implementation of Bitswap (still to come) could make it so that your node downloads valuable blocks (e.g. popular or rare) that you can then send to other users who do want those blocks (when/if they are requested). You can think of this as a form of bartering, or as you increasing your reputation with other users so that they find/send you more blocks that you’re looking for. So, one reason you’d want to volunteer storage would be store files others might request, and in fulfilling such requests you can increase your reputation with other users (and thus the amount of bandwidth they allocate toward sending you blocks/files that you want). Also, since all of your IPFS peers (IPFS nodes with whom you currently have active connections) send you their ‘wantlist’ (list of blocks that they want), you can also help them search the network for the blocks they want (again to increase your reputation with those peers).

  2. Nodes can only store as much data as you specify in the IPFS config. And yes, there’s a chance that the data you’re looking for is on a different continent. That’s one reason for incentives – if you combine Filecoin with smart contracts, for example, you could explicitly pay miners for storing your data on one or more specified continents. Or, if the file is sufficiently popular on your continent, then there’s a good chance it’ll be relatively close to you.

  3. A file’s availability has to do with how many people want that file. If a file (e.g. viral video) is very popular, then a lot of nodes are likely to cache it and it will have high availability. In an IPFS + Filecoin scenario, a file might be popular because someone is offering to pay a lot of money for long-term storage of that file, which incentivizes miners to store it. Also, if ipfs daemon is not running, then blocks stored in your node will not be garbage collected (barring unusual circumstances, like you manually removing blocks from your datastore or other programs doing so). ipfs runs the garbage collector, so if the daemon is not running then it wouldn’t be able to garbage collect anything itself.

  4. Following from the above points, there are a lot of incentives at play to get people involved with IPFS. The potential for lower bandwidth usage, higher file availability, a more robust design (than HTTP gives, for example) which mediates things like ‘offline’ use of files/applications, etc. IPFS itself directly incentivizes users through its distributed design, but additional mechanisms like cryptocurrencies (e.g. Filecoin) can be built on top of IPFS to provide incentives in other ways (like currency for storing data).


Hello all,

Sorry for bringing up this old topic, but it discusses a question about IPFS for which I cannot really find a clear answer. I browsed through a number of discussions on this topic and decided to post my comment.

As I understand so far, this is how it works (please correct me if I’m wrong). For example, I share a file on IPFS and only one other node downloads or pins it. If after some time that node decides that it doesn’t want to provide storage for that file to keep it locally and deletes it, and my node happens to be offline, then no one else can get the file.

If this is true, then the permanency of this kind of Web is not guaranteed. Similar to BitTorrent, if there are no active seeders, you cannot get the file.

Therefore, if no active nodes provide access to the file, does it mean that the hash becomes broken? Similarly to http:// link becoming broken if server error occurs?

Could someone please comment on this, is this correct or am I missing something?

It seems to be True AGS; you’ll either have to pay for it to be permanently store, or win the popularity race!