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

Commit

Permalink
separates out routing shreds from establishing connections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
behzadnouri committed Oct 9, 2023
1 parent c924719 commit c0ffb78
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 102 deletions.
2 changes: 1 addition & 1 deletion turbine/src/cluster_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ impl From<Pubkey> for NodeId {

#[inline]
pub(crate) fn get_broadcast_protocol(_: &ShredId) -> Protocol {
Protocol::UDP
Protocol::QUIC
}

pub fn make_test_cluster<R: Rng>(
Expand Down
Loading

0 comments on commit c0ffb78

Please sign in to comment.