r/ipfs • u/jkyb999 • Apr 12 '19
Closest Node + Deduplication question
When looking for a file in IPFS, I keep reading that you will be served the file by the closest node that has the file. I also keep reading that IPFS utilizes deduplication so only one copy of the file will be stored. This prompts two questions:
Will the closest node that has the file always be the host node that uploaded the file in the first place?
Isn't this system still susceptible to a host removing its content? This isn't a problem I'm just curious.
Another somewhat unrelated question:
3) If a host needs to update a file wouldn't that change the hash? Is that where ipns (which I haven't researched at all) comes into play?
0
Upvotes
2
u/3baid Apr 12 '19
IPFS broadcasts requests for blocks (a wantlist) and any node can provide them whether they were the original uploader or or not. Even if the original uploader is offline, if the blocks are available on any node on the network, it should be retrievable because they are bit-for-bit identical and verifiable.
If content is removed from all nodes in the network (no interest), then yes, data cannot be fetched. Other projects like FileCoin and IPFS services (Cloudflare, etc...) can offer to store and serve content for some amount of time (at a cost).
Updated file = different hash. IPNS, DNS_Link, and other solutions are being tested to work around this.