Skip to content

feat: Prioritize peers based on previous dial succession / failure #1953

@maschad

Description

@maschad

Following from the conversation here,

If a peer recently failed to establish a connection, there might be underlying issues causing the failure that haven't been resolved yet (may take longer than 10 minutes), and so it's far less likely that a successful connection would result from dialling that peer, as opposed to a peer which was recently successfully dialled but for whatever a reason that connection was closed.

Modifying the tag value is not ideal. The problem is the connection manager doesn't know what it means to penalize a peer, because it doesn't know what the value of a tag added by one component means compared to a tag added by another so it cannot alter the tag values without possibly compromising the functioning of the components doing the tagging.

So if we've successfully dialled the peer recently, but we are no longer connected to them, we should prioritize those peers and conversely if we have dialled a peer but failed recently, those should be de-prioritized.

cc @achingbrain @wemeetagain @p-shahi

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/discussionTopical discussion; usually not changes to codebasekind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    Status

    🎉Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions