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

ipfs swarm and ipfs-cluster #34

Open
aronayne opened this issue Nov 9, 2016 · 1 comment
Open

ipfs swarm and ipfs-cluster #34

aronayne opened this issue Nov 9, 2016 · 1 comment

Comments

@aronayne
Copy link

aronayne commented Nov 9, 2016

Is my premise correct :

Given three ipfs installations on same LAN : n1,n2,n3 (node1,node2,node3)

In order to connect these nodes together to form a 3 node 'cluster' I run:

on n1
ipfs swarm connect n2
ipfs swarm connect n3

But I could also have connected the nodes using :

on n2
ipfs swarm connect n1
ipfs swarm connect n3

or

on n3
ipfs swarm connect n1
ipfs swarm connect n2

So ipfs swarm connect is a bi-directional connection.

By 'connect' I mean when I execute 'ipfs add f1' on n1,n2 or n3 where f1 is a 1GB file , f1 will be split into three pieces distributed on nodes n1,n2,n3.

Is my premise correct ?

Is ipfs-cluster then a management tool for nodes connected via ipfs swarm ?

@hsanjuan
Copy link
Contributor

IPFS runs autodiscovery (mDNS), so the nodes in your LAN would probably be autodiscovered first.

You can use ipfs swarm to manually open connections between nodes, but normally your nodes are discoverable to the network anyway as everyone uses the bootstrap nodes which facilitate this. If your nodes were completely isolated and did not connect to bootstrap nodes, then yes, ipfs swarm connect (any of your examples I think) would be the way to manually inform them that they have peers which are undiscoverable in any other way.

When you add your f1 1GB file, f1 is not split into 3 parts. If anything f1 will be chunked into blocks, but those blocks remain in the node you added the file and are only transmitted to a different node when they are requested from that node. There is no clustering/data-partitioning in the way I think you are expecting it.

ipfs-cluster as it is right now is just an idea (there is no tool atm) which we are going to work on. ipfs-cluster should allow to handle data mirroring among different nodes and to compose clusters of ipfs nodes by providing a ipfs api layer on top of them.

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

No branches or pull requests

2 participants