196aa23f34
Currently, unless doing Join() (--bootstrap), we do not connect to any peers on startup. We however loaded up the peerstore file and Raft will automatically connect older peers to figure out who is the leader etc. DHT bootstrap, after Raft was working, did the rest. For CRDTs we need to connect to people on a normal boot as otherwise, unless bootstrapping, this does not happen, even if the peerstore contains known peers. This introduces a number of changes: * Move peerstore file management back inside the Cluster component, which was already in charge of saving the peerstore file. * We keep saving all "known addresses" but we load them with a non permanent TTL, so that there will be clean up of peers we're not connected to for long. * "Bootstrap" (connect) to a small number of peers during Cluster component creation. * Bootstrap the DHT asap after this, so that other cluster components can initialize with a working peer discovery mechanism. * CRDT Trust() method will now: * Protect the trusted Peer ID in the conn manager * Give top priority in the PeerManager to that Peer (see below) * Mark addresses as permanent in the Peerstore The PeerManager now attaches priorities to peers when importing them and is able to order them according to that priority. The result is that peers with high priority are saved first in the peerstore file. When we load the peerstore file, the first entries in it are given the highest priority. This means that during startup we will connect to "trusted peers" first (because they have been tagged with priority in the previous run and saved at the top of the list). Once connected to a small number of peers, we let the DHT bootstrap process in the background do the rest and discover the network. All this makes the peerstore file a "bootstrap" list for CRDTs and we will attempt to connect to peers on that list until some of those connections succeed. |
||
---|---|---|
.github/ISSUE_TEMPLATE | ||
.gx | ||
adder | ||
allocator | ||
api | ||
cmd | ||
config | ||
consensus | ||
datastore | ||
deptools | ||
docker | ||
informer | ||
ipfsconn/ipfshttp | ||
monitor | ||
observations | ||
pintracker | ||
pstoremgr | ||
rpcutil | ||
sharness | ||
state | ||
test | ||
version | ||
.codeclimate.yml | ||
.codecov.yml | ||
.dockerignore | ||
.gitignore | ||
.travis.yml | ||
add_test.go | ||
allocate.go | ||
CHANGELOG.md | ||
cluster_config_test.go | ||
cluster_config.go | ||
cluster_test.go | ||
cluster.go | ||
clusterhost.go | ||
config_test.go | ||
connect_graph.go | ||
CONTRIBUTING.md | ||
COPYRIGHT | ||
docker-compose.yml | ||
Dockerfile | ||
Dockerfile-bundle | ||
Dockerfile-test | ||
go.mod | ||
go.sum | ||
ipfscluster_test.go | ||
ipfscluster.go | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
logging.go | ||
Makefile | ||
package.json | ||
peer_manager_test.go | ||
pnet_test.go | ||
README.md | ||
release.sh | ||
rpc_api.go | ||
rpc_policy.go | ||
util.go |
IPFS Cluster
Pinset orchestration for IPFS.
IPFS Cluster is a stand-alone application and a CLI client that allocates, replicates, and tracks pins across a cluster of IPFS daemons.
It provides:
- A cluster peer application:
ipfs-cluster-service
, to be run along withgo-ipfs
. - A client CLI application:
ipfs-cluster-ctl
, which allows easily interacting with the peer's HTTP API.
Are you using IPFS Cluster?
Please participate in the IPFS Cluster user registry.
Table of Contents
Documentation
Please visit https://cluster.ipfs.io/documentation/ to access user documentation, guides and any other resources, including detailed download and usage instructions.
News & Roadmap
We regularly post project updates to https://cluster.ipfs.io/news/ .
The most up-to-date Roadmap is available at https://cluster.ipfs.io/roadmap/ .
Install
Instructions for different installation methods (including from source) are available at https://cluster.ipfs.io/download .
Usage
Extensive usage information is provided at https://cluster.ipfs.io/documentation/ , including:
Contribute
PRs accepted. As part of the IPFS project, we have some contribution guidelines.
Small note: If editing the README, please conform to the standard-readme specification.
License
This library is dual-licensed under Apache 2.0 and MIT terms.
© 2019. Protocol Labs, Inc.