Kademlia 中如何选择数字 k?
How the number k is chosen in Kademlia?
我阅读了有关 Kademlia 的论文here。
我不明白数字 k 是如何选择的(对于 k 桶)。
我不明白这句话:"k is chosen such that any given k nodes are very unlikely to fail within an hour of each other."
我不明白节点怎么会失败?
Kademlia 是一种抽象算法。
个人实施可以根据网络中节点的预期特征选择自己的k
。
例如,如果您想在高度可靠的数据中心中形成一个由几百个节点组成的小型覆盖层,那么 k = 2 可能就足够了。
Bittorrent 使用 k = 8 和大量散布在整个互联网上的国内(阅读:非常不可靠)节点,它完成了它的工作,但它的工作并不是特别苛刻。所以不能仅凭这一点就推断出这是实际上限。
I don't understand how a node failing?
计算机崩溃、脱机、更改互联网连接、重新启动、进入休眠状态。从网络的角度来看,所有这些实际上都是节点故障。
以下是我设法找到的 k-bucket 值对 Kademlia 网络行为的重要性:
基于Improving Community Management Performance with Two-Level Hierarchical DHT Overlays论文:
- 低 k 意味着网络更加碎片化
- 高 k 表示查找期间的跳数较少,但维护流量较高
The value of k (referring to bucket size, a Kademlia-specific parameter) has a major impact for the operation of the Kademlia DHT. On the first hand, the value should not be set too low; otherwise the network could become fragmented, complicating or even preventing the routing of messages between some peers. On the second hand, the value should not be set too high or a significant amount of unnecessary load from maintenance traffic would be inflicted on the network.
确切的数量应该是多少(在大小为 100 和 500 的网络上测试):
The measurements indicated that k values of 1
and 2 were insufficient to prevent the fragmentation of the
network. The chosen k value of 3 was enough to achieve a
consistent network structure in both of the network sizes.
With the k value of 4 and larger, the nodes’ knowledge of
the network develops further, but at the cost of increased
maintenance traffic. Even though the average hop count
decreases, the larger routing table induces more KeepAlive
messaging.
“维护流量”是发送的 KeepAlive 消息的数量。 KeepAlive 消息正在 k-bucket 秒内发送到所有设备,以确保连接处于活动状态。如果我们不发送它们,有一天我们可能会没有连接,无法参与网络。虽然在本文中,他们每分钟发送几条这样的消息,但我不确定在现实生活中是否需要那么多。
k-buckets 的另一个 use-case 在这个问题中链接的论文中:Kademlia: A Peer-to-peer Information System Based on the XOR Metric。一开始我忽略了它,因为我认为它是原始的 Kademlia 论文。虽然这里的作者是一样的,但是发现内容不一样,其实是在讲k-buckets的意义:
- 他们促进在网络中的时间更长(你的节点越稳定,你在网络中的意义就越大)
- 它们可以防止 DoS 攻击。用新节点淹没网络不会造成破坏,因为旧节点仍会在 k-buckets
后出现
A second benefit of k-buckets is that they provide resistance to certain DoS attacks. One cannot flush nodes’ routing state by flooding the system with new nodes. Kademlia nodes will only insert the new nodes in the k-buckets when old nodes leave the system
所以我想这是选择 k
值时的第二个因素:更高的 k 意味着您的网络更容易由于 Sybil/Eclipse 攻击
而被劫持
我阅读了有关 Kademlia 的论文here。
我不明白数字 k 是如何选择的(对于 k 桶)。
我不明白这句话:"k is chosen such that any given k nodes are very unlikely to fail within an hour of each other."
我不明白节点怎么会失败?
Kademlia 是一种抽象算法。
个人实施可以根据网络中节点的预期特征选择自己的k
。
例如,如果您想在高度可靠的数据中心中形成一个由几百个节点组成的小型覆盖层,那么 k = 2 可能就足够了。
Bittorrent 使用 k = 8 和大量散布在整个互联网上的国内(阅读:非常不可靠)节点,它完成了它的工作,但它的工作并不是特别苛刻。所以不能仅凭这一点就推断出这是实际上限。
I don't understand how a node failing?
计算机崩溃、脱机、更改互联网连接、重新启动、进入休眠状态。从网络的角度来看,所有这些实际上都是节点故障。
以下是我设法找到的 k-bucket 值对 Kademlia 网络行为的重要性:
基于Improving Community Management Performance with Two-Level Hierarchical DHT Overlays论文:
- 低 k 意味着网络更加碎片化
- 高 k 表示查找期间的跳数较少,但维护流量较高
The value of k (referring to bucket size, a Kademlia-specific parameter) has a major impact for the operation of the Kademlia DHT. On the first hand, the value should not be set too low; otherwise the network could become fragmented, complicating or even preventing the routing of messages between some peers. On the second hand, the value should not be set too high or a significant amount of unnecessary load from maintenance traffic would be inflicted on the network.
确切的数量应该是多少(在大小为 100 和 500 的网络上测试):
The measurements indicated that k values of 1 and 2 were insufficient to prevent the fragmentation of the network. The chosen k value of 3 was enough to achieve a consistent network structure in both of the network sizes. With the k value of 4 and larger, the nodes’ knowledge of the network develops further, but at the cost of increased maintenance traffic. Even though the average hop count decreases, the larger routing table induces more KeepAlive messaging.
“维护流量”是发送的 KeepAlive 消息的数量。 KeepAlive 消息正在 k-bucket 秒内发送到所有设备,以确保连接处于活动状态。如果我们不发送它们,有一天我们可能会没有连接,无法参与网络。虽然在本文中,他们每分钟发送几条这样的消息,但我不确定在现实生活中是否需要那么多。
k-buckets 的另一个 use-case 在这个问题中链接的论文中:Kademlia: A Peer-to-peer Information System Based on the XOR Metric。一开始我忽略了它,因为我认为它是原始的 Kademlia 论文。虽然这里的作者是一样的,但是发现内容不一样,其实是在讲k-buckets的意义:
- 他们促进在网络中的时间更长(你的节点越稳定,你在网络中的意义就越大)
- 它们可以防止 DoS 攻击。用新节点淹没网络不会造成破坏,因为旧节点仍会在 k-buckets 后出现
A second benefit of k-buckets is that they provide resistance to certain DoS attacks. One cannot flush nodes’ routing state by flooding the system with new nodes. Kademlia nodes will only insert the new nodes in the k-buckets when old nodes leave the system
所以我想这是选择 k
值时的第二个因素:更高的 k 意味着您的网络更容易由于 Sybil/Eclipse 攻击