What happens to data when a node dies in a DHT?

我们两清 提交于 2019-12-24 02:23:07

问题


Question Taken from here: https://groups.google.com/forum/#!topic/byu-cs-460-computer-networking/hpESI0NapmY

"I was thinking about how Distributed Hash Tables store data. I understand that each node is given an identifier and that the data is then stored on the node whose identifier is the closest successor to its (the data's) hash value. I also understand that when nodes join or leave the network, the data gets transferred to reflect the new set of nodes present in the network.

What I don't understand is what happens when a node dies before it can hand off its data. Is that data lost? Maybe my real question is: how can data be guaranteed not to be lost in a DHT?"


回答1:


A DHT in general is just an distributed algorithm. Specific implementations deal differently with node failures.

Put requests generally are done with some level of redundancy. Additionally the target nodes may replicate data among themselves or the originating node may periodically refresh the stored data.

In a fully decentralized p2p environment where you have no control over individual nodes you cannot really guarantee that data stays in the network forever by itself. Although on a sufficiently stable network lifetimes measured in days can probably be achieved.

In p2p networks DHTs are usually just used for discovery and metadata publication.

I.e. if Node A wants to find Node B then it'll query the DHT and in the lookup process visit a bunch of 3rd party nodes that have no direct interest in A or B.

Once discovery is done the "heavy lifting" is done by a direct peer-peer connection between A and B.



来源:https://stackoverflow.com/questions/26009535/what-happens-to-data-when-a-node-dies-in-a-dht

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!