Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

periodic topology gossip is O(n^2) #517

Closed
rade opened this issue Apr 6, 2015 · 1 comment · Fixed by #521
Closed

periodic topology gossip is O(n^2) #517

rade opened this issue Apr 6, 2015 · 1 comment · Fixed by #521
Assignees
Milestone

Comments

@rade
Copy link
Member

rade commented Apr 6, 2015

Even after #514, there is still some O(n^2) complexity remaining in topology gossip, namely in the period gossip. This currently sends the gossip data to all neighbours. So we have n peers performing n-1 sends.

Traditional gossip protocols only send gossip to a random subset (of, usually log(n) size) of neighbours. However, this assumes a relatively regular topology. With highly irregular topologies, especially those containing "bottleneck" links (where one set of peers can reach another only via a very small number of links), propagation delays are prohibitive.

That's why we decided to gossip to all neighbours.

But we can do better. Peers have knowledge of the topology and hence know which links are bottlenecks. We can use that information to select random neighbours for gossip communication, with the random distribution skewed towards the bottleneck links.

@rade
Copy link
Member Author

rade commented Apr 6, 2015

It turns out that peers already effectively calculate a topology-sensitive probability distribution for selecting neighbours: the unicast topology. For every peer this tells us which of our neighbours we ought to send a message to in order to reach that peer. The probability distribution of the neighbour values is exactly what we are looking for - neighbours at the other end of a bottleneck link will appear in it more frequently than others.

@rade rade self-assigned this Apr 7, 2015
@rade rade modified the milestone: 0.10.0 Apr 9, 2015
bboreham added a commit that referenced this issue Apr 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant