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

sending all gossip down new connections is wasteful #454

Closed
rade opened this issue Mar 12, 2015 · 0 comments · Fixed by #461
Closed

sending all gossip down new connections is wasteful #454

rade opened this issue Mar 12, 2015 · 0 comments · Fixed by #461
Assignees
Milestone

Comments

@rade
Copy link
Member

rade commented Mar 12, 2015

Weave sends all gossip down new connections. We do this so that new peers learn about all gossip'ed information quickly, thus enabling them to process subsequent incremental updates. In particular, for topology gossip it ensures that the remote peer learns about all other peers. This ensures that the incremental update, which is sent as a result of the new connection getting established and which may reference a number of other peers, can be processed.

So the intent really is to send all gossip to every peer. But what we actually do is send it down every new connection. Not every new connection is from a new peer. In fact most connections aren't. Hence the current approach is wasteful.

rade added a commit to rade/weave that referenced this issue Mar 16, 2015
Weave sends all gossip down new connections. We do this so that new
peers learn about all gossip'ed information quickly, thus enabling
them to process subsequent incremental updates. In particular, for
topology gossip it ensures that the remote peer learns about all other
peers. This ensures that the incremental update, which is sent as a
result of the new connection getting established and which may
reference a number of other peers, can be processed.

So the intent really is to send all gossip to new peers. But what we
actually do is send it down every new connection. Not every new
connection is from a new peer. In fact most connections aren't. Hence
the current approach is wasteful.

To fix this we need a conservative detection of new peers, i.e. it is
preferable to have false positives. This contrasts with existing logic
in the handshake code. The criteria we use is whether our peer has a
unicast route to the other peer. That is only the case when there is a
continuos chain of symmetric, established connections. The
establishment of these connections should have triggered the sending
of all gossip to the other peer. So we don't need to send it ourself.

Fixes weaveworks#454.
@rade rade self-assigned this Mar 16, 2015
@rade rade modified the milestone: 0.10.0 Apr 18, 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.

2 participants