The new version of IPFS Cluster comes with thousands of lines of new code which implement content adding and replication to IPFS using IPFS Cluster.
That means that we know have an
ipfs-cluster-ctl add command that, just like its
ipfs add cousing, can chunk and turn files and folders into Direct-Acyclic-Grapgs (DAGs), identified by a Content ID (CID), which is returned to the user when the adding process is completed.
IPFS Cluster performs the DAG buidling in an equivalent way to
ipfs, but stores the results different. While
ipfs sends the resulting blocks directly to disk, IPFS Cluster allocates Cluster peers for the content and forwards the blocks to them (as they are generated). When the content has been added, it is then pinned in those allocations. Since the content is available locally in the allocations, pinning is a quicker step.
Thus adding to Cluster allows replicating and pushing content to multiple IPFS daemons. Additionally, you can take advantage of the Cluster API features when adding content to IPFS: basic authentication and secure channels (either via HTTPS or via libp2p-http). For example, if you run a cluster and want to add something to it, you can do it all in a single command:
ipfs-cluster-ctl --host /dnsaddr/my.cluster.domain --basic-auth user:pw add --rmin 2 --rmax 2 --name "my stuff" --recursive myFolder/
add is not the only feature in the
0.5.0. We have also added a new experimental PinTracker
stateless implementation which uses less memory (see last post by @lanzafame) and enabled DHT-routing so that Cluster peers can auto-discover other peers.
Check out the changelog for a full list of changes and important notices if you are upgrading.
Finally, big thanks to all the contributors to this release: @lanzafame, @zenground0, @laevos and @whilei.