Quic limit connections (#23283)

* quic server limit connections

* bump per_ip

* Review comments

* Make the connections per port
This commit is contained in:
sakridge
2022-03-09 10:52:31 +01:00
committed by GitHub
parent 8a4b019ded
commit 7a9884c831
2 changed files with 316 additions and 28 deletions

View File

@@ -36,6 +36,9 @@ use {
pub const DEFAULT_TPU_COALESCE_MS: u64 = 5;
// allow multiple connections for NAT and any open/close overlap
pub const MAX_QUIC_CONNECTIONS_PER_IP: usize = 8;
pub struct TpuSockets {
pub transactions: Vec<UdpSocket>,
pub transaction_forwards: Vec<UdpSocket>,
@@ -108,6 +111,7 @@ impl Tpu {
cluster_info.my_contact_info().tpu.ip(),
packet_sender,
exit.clone(),
MAX_QUIC_CONNECTIONS_PER_IP,
)
.unwrap();