Skip to content

Commit

Permalink
add comment for size of channel
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillLykov committed Dec 3, 2024
1 parent bce21e0 commit 1cea552
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions send-transaction-service/src/transaction_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ where
where
T: TpuInfoWithSendStatic + Clone,
{
// The channel size is a compromise value designed to prevent packet
// loss during outages lasting up to (128 * batch_size / rpc_tps)
// seconds.
// For a reasonable batch_size of 64 and rpc_tps of approximately 1000 transactions per second,
// this channel size can handle an outage of up to 8 seconds without dropping packets.
let (sender, receiver) = mpsc::channel(128);

let cancel = CancellationToken::new();
Expand Down

0 comments on commit 1cea552

Please sign in to comment.