How to check Replication Process in IPFS Node

I want to know if there is a surefire way to check that a node has content replicated from another node when a new file is added via ipfs cluster. I tried checking the local blocks folder of the node but it doesn’t change accordingly. Thanks!

you can watch ipfs-cluster-ctl status
It’s usually good enough for me (this will ask each node their current status, might get lost if ipfs-cluster-service gets out of sync with the ipfs node (this only happen if you pin / unpin stuff on the ipfs node without telling ipfs cluster))

Else you can watch in ipfs, the providers of a file, example ipfs dht findprovs Qmfoo, but this is less reliable (this is the DHT, the goal is to find a few valid node hosting a file, not all of them).

1 Like

I see, what does the second command do? I’m guessing it searches for any hashes in the db of the ipfs that match the provided cid. Am I right? I tried with files with different sizes and noticed that the bigger the file, the bigger the output. Example obtained:
12D3KooWNQXp9ydMudFE1cCws8JY6tdGtuuJMY6dUR2vKSWvbER9
12D3KooWPB7VrpDmVEAFeivZ29ApQkSDBZ9nkBaM9TwnxaKKhur5
12D3KooWKUR4T7dgJQGjQzxxDhMBqCiKGK4xqBDV4q5f2tQBJxx9
12D3KooWLPq9f5dQyDvaJE9skxqfgYDiASM1avqYa8VRctyLuCvB

https://docs.ipfs.io/reference/cli/#ipfs-dht-findprovs
After reading it up, it seems it shows peers that have information with that cid. But I only instantiated 3 IPFS nodes in my configuration, and it showed 4 peers having it. Why is this happening?

Because this scans the whole network, not only your peers.

Someone else downloaded this file (or added it on it’s own), you have used a gateway and the gateway is still reproviding, …

1 Like

I see, thanks! :slight_smile: It works!