Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
v1.17: separates out routing shreds from establishing connections (ba…
Browse files Browse the repository at this point in the history
…ckport of #33599) (#33772)

separates out routing shreds from establishing connections (#33599)

Currently each outgoing shred will attempt to establish a connection if
one does not already exist. This is very wasteful and consumes many
tokio tasks if the remote node is down or unresponsive.

The commit decouples routing packets from establishing connections by
adding a buffering channel for each remote address. Outgoing packets are
always sent down this channel to be processed once the connection is
established. If connecting attempt fails, all packets already pushed to
the channel are dropped at once, reducing the number of attempts to make
a connection if the remote node is down or unresponsive.

(cherry picked from commit 8becb72)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
  • Loading branch information
mergify[bot] and behzadnouri authored Oct 20, 2023
1 parent 685e329 commit de407ad
Showing 1 changed file with 153 additions and 123 deletions.
Loading

0 comments on commit de407ad

Please sign in to comment.