Relays data synchronization (relay network)

Hi! I’m trying out libp2p in my application.

I was able to connect several peers to each other through a relay sever. However, in a real application there will probably be many peers trying to reach many other peers.

So I was thinking it would be useful to have many relays available in remote servers. But each peer could connect to any relay. So if the Peer1 is connected to the RelayN and Peer2 want to connect to Peer1, then Peer2 will have to search for Peer1 in any relay in some RelayList until reach RelayN.

So I was wondering which is the correct way to handler this case? Are any way to have many relays connected to each other and synchronizing the client info?

Have you already taken a look at gossip? It will likely meet your needs. With gossip, you can set up a discovery mechanism and also configure a bootstrap as PeerExchange. In your infrastructure, try to consider a setup where all relays can have the same datastore, this way, any relay will be able to respond.

1 Like