Kademlia load balancing#28
Conversation
|
|
||
| * Given `m` requests to `n` peers in a bin, after `m*n` requests the peers will have made `m` requests each. | ||
| * Given `m` requests to `n` peers within the neighborhood, after `m*n` requests the peers will have made `m` requests each. | ||
| * Given `m` requests for no capability and `ma` requests for capability `a` to peers `n` with all capabilities and peers `na` with capability `a`, after `n*n + ma*na` requests the `ma` peers will have made `ma+m` requests each. |
There was a problem hiding this comment.
n * n -> m * n
the ma -> the na
I think it should be.
| * Given `m` requests for no capability and `ma` requests for capability `a` to peers `n` with all capabilities and peers `na` with capability `a`, after `n*n + ma*na` requests the `ma` peers will have made `ma+m` requests each. | |
| * Given `m` requests for no capability and `ma` requests for capability `a` to peers `n` with all capabilities and peers `na` with capability `a`, after `m*n + ma*na` requests the `na` peers will have made `ma+m` requests each. |
|
|
||
| ## Specification | ||
|
|
||
| The component should be a layer above the kademlia itself, and most likely sits in the same layer as - or is even perhaps the same component as - the planned convergence of the request and message forwarding engine (todo link to related issue). |
There was a problem hiding this comment.
Forwarding issue:
ethersphere/swarm#1656
|
What is the definition of a request? Should be accounted each time a peer is returned to the caller or it depends on the use that caller is doing with the Peer. p.Kademlia.EachConn(to, addressLength*8, func(sp *network.Peer, po int) bool {
if po < broadcastThreshold && sent > 0 {
return false // stop iterating
}
...In this case, sp won't be used.
|
|
Number 2. A bool argument should suffice, I guess? We can rename the function, then have a new function with the existing name wrap that function, with that argument set so accounting is not done. |
I was implementing something like that, but is a returning value of that |
|
|
||
| ## Motivation | ||
|
|
||
| Currently no logic exists to guarantee that routing is distributed among peers in a bin. If a bin is unchanged between kademlia queries for forwarding peers in that bin, currently the most likely result is that the same peer will always be returned. This |
There was a problem hiding this comment.
"returned. This
Hence ... "
can you please reword this?
in progress