I’d like some clarification regarding how Bitswap deals with files replicated over multiple peers.
So let’s say that I have 3 peers A B and C. One big file is pinned on A and B.
Now, C tries to get this file.
Should I expect C to download the file only from A or B, or can Bitswap use both peers as a source for the file?
Can such setting distribute the burden of providing this file?
Bitswap can, and often does, make use of multiple peers when fetching data. The implementation of this behavior is under active development and we hope to improve the performance of bitswap transfers significantly over the next few months. One thing that can happen now is that we ask too many peers for the same data, and our transfers slow down because we receive the same block from multiple peers (wasting bandwidth). We also don’t yet implement a great mechanism for prioritizing really fast peers, so we’re not always making requests to the best nodes. So, yes - bitswap does do this, and it it’s also getting better at doing this.