Large number of TCP connections

Hi!

We are building a blockchain using the Polkadot SDK, that uses libp2p under the hood.

The problem: It seems that libp2p opens a large number of TCP connections every ~10 minutes. This makes the internet connection unreliable for our users that are running validator nodes on their home network. We are suspecting that this peak is caused by the peer discovery protocol of libp2p.

Here are a few solutions, that we “have tried, but they didn’t fix our issue” / “ruled out”:

- Switch to DHT client mode instead of server mode (DHT client mode screws up connectivity) [Ruled out]

- Switching to [litep2p] (Tried it, didn’t fix)

This Wireshark IO graph shows the number of TCP connections initiated per second. The graph spans 20 minutes of traffic, and every 10 minutes there is a spike of outgoing connections from the node. This kills 20% of routers or ISP connections among our >1000 users. Is there a way to spread out the DHT updates in a way that is compatible with NAT?