this post was submitted on 17 Dec 2023
18 points (100.0% liked)

networking

2824 readers
2 users here now

Community for discussing enterprise networks and the ensuing chaos that comes after inheriting or building one.

founded 1 year ago
MODERATORS
 

I'm building this implementation of a circular DHT from scratch because I want to learn and understand how peer-to-peer protocols work. So far so good, but I'm realizing I don't know two things and I don't know where to find them:

  1. What NAT traversal method to use. Do I necessarily need to rely on relay servers for UDP hole punching or STUN?
  2. What is the most reasonable way to test the overall system is working? Should I build a docker network with each node being a container or are there specialized tools for testing networked applications?

Thanks in advance for any answers or pointers!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] sugar_in_your_tea@sh.itjust.works 4 points 11 months ago (1 children)
  1. Yup, pretty much, unless you can guarantee everyone is on IPv6, which isn't likely.
  2. Yup, docker or kunernetes is probably the way to go.

I'm building something based on Iroh, which is basically a DIY IPFS system. They have their own DHT, but AFAIK the "distributed" part is very much DIY (i.e. balancing between nodes). Maybe it's worth looking at, the code is pretty easy to follow imo.

Thank you! Seems like I'll need to learn Docker networking. I had read that some projects like Tor use their own tool to simulate networks, but it's probably overkill for this, as it's just a pet project.