Skip to content
This repository has been archived by the owner. It is now read-only.

Does IPFS can download a file from the closest source file available ? #102

Closed
mpgn opened this issue Mar 27, 2016 · 4 comments
Closed

Does IPFS can download a file from the closest source file available ? #102

mpgn opened this issue Mar 27, 2016 · 4 comments
Labels

Comments

@mpgn
Copy link

mpgn commented Mar 27, 2016

Two people have IPFS and user1 download a file with IPFS. The other one want to download the same file and click on the same link as user1. The file retrieves from user2 will be download from user1 ?

Now imagine we can get the closest ? (maybe it's already possible)

Every tutorial use ipfs.io to/ipfs or ipfs.ip/ipns to share link. Of course you can share a link with a direct IPv4 adresse, but i think the file will be download every time from this adress and IPFS will no look for the closest source so we came back to centralized data.
But if ipfs.io fall down, there is no more gateway, and the system is broken no ?

@mpgn mpgn changed the title Is IPFS can download a file from the closest source file available ? Does IPFS can download a file from the closest source file available ? Mar 27, 2016
@Kubuxu
Copy link

Kubuxu commented Mar 27, 2016

Public gateways (ipfs.ip/ipfs/) are only temporary migration facility. For full IPFS's potential you have to run local daemon which will act as your own private gateway. This gateway will try to download content from the closest peer available.

Using links in format: https://ipfs.io/ipns/bin.ipfs.ovh/ is temporary measure so people that don't have IPFS running can use services. With right addon (ipfs-gateway-redirect for FF) links in this format are usable: fs:/ipns/bin.ipfs.ovh/ which is probably targeted format for browsers.

@morningyyy
Copy link

morningyyy commented Sep 6, 2016

What's the "closest" mean? Min geolocation distance? Or network topology cost? Or RTT?
How can IPFS know which peer is the closest?

@Ghoughpteighbteau
Copy link

Ghoughpteighbteau commented Sep 6, 2016

actually, IPFS has a pretty good idea from the outset what peers are local, because peers announce their local addresses as well.

~ $ ipfs swarm addrs
QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu (5)
    /ip4/127.0.0.1/tcp/4001
    /ip4/128.199.219.111/tcp/4001
    /ip4/172.17.0.1/tcp/4001
    /ip6/::1/tcp/4001
    /ip6/fc4e:5427:3cd0:cc4c:4770:25bb:a682:d06c/tcp/4001
QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64 (5)
    /ip4/104.236.76.40/tcp/4001
    /ip4/127.0.0.1/tcp/4001
    /ip4/172.17.0.1/tcp/4001
    /ip6/::1/tcp/4001
    /ip6/fcd8:a4e5:3af7:557e:72e5:f9d1:a599:e329/tcp/4001
QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm (5)
    /ip4/127.0.0.1/tcp/4001
    /ip4/162.243.248.213/tcp/4001
    /ip4/172.17.0.1/tcp/4001
    /ip6/::1/tcp/4001
    /ip6/fcfe:eab4:e49c:940f:8b29:35a4:8ea8:b01a/tcp/4001
QmdkJZUWnVkEc6yfptVu4LWY8nHkEnGwsxqQ233QSGj8UP (8)
    /ip4/10.132.250.250/tcp/4001
    /ip4/10.17.0.5/tcp/4001
    /ip4/127.0.0.1/tcp/4001
    /ip4/172.17.0.1/tcp/4001
    /ip4/172.18.0.1/tcp/4001
    /ip4/45.55.151.20/tcp/4001
    /ip6/2604:a880:800:10::ea5:7001/tcp/4001
    /ip6/::1/tcp/4001

It's a good bet that communicating with people at these addresses will be way faster than through any kind of internet infrastructure.

@madavieb
Copy link

madavieb commented May 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants