I’m testing setting up a “private” IPFS network through the use of a custom DHT protocol id (like OpenBazaar). Using IPTB, my goal is to run 100 nodes, connect them in a ring shape (i to i+1) and benchmark the speed of DHT requests.
My problem is that once two neighbors get connected, they both connect to each other’s peers, etc. So I end up with every peer connected to each other. I tried to circumvent that by tweaking the ConnectionManager (low low/high water, low grace period) but nodes still keep about a third of the total number of peers as connected peers. I assume this is coming from the DHT that protects nodes for routing, as mentioned here.
Is there an easy way to reduce peer connection to manual peering (
ipfs swarm connect or
iptc connect i i+1) only? This is just for testing, not for production (obviously this is not a behavior we want in prod).