..

ipfs cluster 架构

背景

在进一步研究 ipfs cluster 前,需要对他的架构有个了解。


架构图 1

image


模块

The IPFS Cluster software consists of three binary files:

  • ipfs-cluster-service
    runs a Cluster peer (similar to ipfs daemon) using a configuration file and by storing some information on disk.
  • ipfs-cluster-ctl
    used to communicate with a Cluster peer and perform actions such as pinning IPFS CIDs to the Cluster.
  • ipfs-cluster-follow
    runs a follower Cluster peer. It can be used as a substitute for ipfs-cluster-service for this specific usecase and mixes some service and ctl features.
The Cluster peer communicates with the IPFS daemon using the HTTP API (localhost:5001). Therefore, the IPFS daemon must be launched and running separately.

Usually, ipfs-cluster-ctl is used on the same machine or server on which ipfs-cluster-service is running. For example, ipfs-cluster-ctl pin add <hash> will instruct the local Cluster peer to submit a pin to the Cluster. The different peers in the Cluster will then proceed to ask their local IPFS daemons to pin that content. The number of pins across the Cluster will depend on the replication factor set in the Cluster configuration file.