How to scale collaborative cluster?

:raised_hand: Hi there!

As said in documentation, collaborative cluster need to have trusted_peers list.

So, is it possible to add new peer as trusted to existing collaborative cluster? Looks like we need to update trusted_peers and peer_addresses on all nodes. So, do anyone have way to do that?

Also, how do you setup and share trusted_peers for large cluster?

Thanks a lot! :pray:

The best way is to provide followers with a configuration template that is hosted on an HTTP endpoint and is updated directly there, as explained here: Hosting a collaborative cluster - Pinset orchestration for IPFS

That way, when follower peers are restarted, they will read the updated configuration.

The clusters in https://collab.ipfscluster.io/ do that… they have a dnslink that points to an /ipns record which is resolved through the local ipfs daemon.

Thanks a lot, @hector! But in which case they should be restarted then?

In order to read the new configuration they should be re-started.

Yes, I got that :slight_smile:
I’m asking about way to trigger that. How IPFS-instance can understand that it should be restarted?

You can’t trigger that externally…

Dear @hector, one more question - how can I scale cluster for write-heavy setup?

I’ve set CLUSTER_REPLICATIONFACTORMIN: "1" and CLUSTER_REPLICATIONFACTORMAX: "1" env variables, added 5 peers and load balancer between them, however it’s still slow as it’s only one peer here

If by writes you mean POST to the /add endpoint, then passing ?local=true should help, particularly if you are load-balancing and keeping replication factor = 1.

Other than that, the configuration things for ipfs mentioned in: Download and setup - Pinset orchestration for IPFS

1 Like