开发者

Is it possible to create a DHT without any static IPs?

开发者 https://www.devze.com 2023-04-12 20:20 出处:网络
I want to us开发者_高级运维e a distributed hash table in an application but I don\'t want to have a central server as entry point. Is there a way to implement this?Yes, there are quite a few ways:

I want to us开发者_高级运维e a distributed hash table in an application but I don't want to have a central server as entry point. Is there a way to implement this?


Yes, there are quite a few ways:

  • Use a public (typically HTTP- or DNS-based) service to store IP addresses. It can be replicated using Fast-flux DNS and/or IP anycast.
  • Preconfigure some addresses, either in the binary or a configuration file. Create a list of peers with the highest uptime, and release that with the next version of your software.
  • Store reliable peers on the disk to try them the next time your program is started.
  • Use IP multicast to find other peers in your local network.
  • Randomly scan IPs. It may take a long time to find a remote peer, but it's the only fully decentralized solution that works in the Internet. This method is only feasible for IPv4.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号