What protocol should i use to discover peers across subnets in a local network? #4222
-
it seems mDNS doesn't really work across multiple subnets. Does this mean i have to go with rendezvous ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
From a networking PoV, it doesn't really make a difference whether you are in a single subnet, one hop away from the public internet or whether you have multiple local networks with different subnets (and routers). Is your network running exclusively in these LANs or do you also expect nodes from outside this network to connect? I assume you perform NAT between these networks? To enable direct connections, you will need to hole-punch between them (see dcutr). To find them, you will need some kind of bootnode that is reachable by all nodes. Probably the easiest is if that bootnode runs kademlia and you make your own private DHT and perform random walks to find other nodes. For a successful hole-punch, you will also need to have relay server(s). How big do you envision your network to be? |
Beta Was this translation helpful? Give feedback.
Then there isn't really any difference from a topology PoV between your LANs and other networks.
So depending on where we are on that spectrum and how beefy your machines are, you could maintain full connectivity.
That makes things a bit easier. I'd suggest you deploy one or more, relatively strong machines to the public internet and use them as bootnodes. If they support kademlia, autonat and relay, all your other nodes can use them to connect amo…