Skip to content

Commit

Permalink
network: increase max incoming connections limit to 2400 (#5018)
Browse files Browse the repository at this point in the history
* Decrease connections per ip addr limit to 15
  • Loading branch information
algorandskiy authored Jan 20, 2023
1 parent 4a26591 commit 8445d67
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions config/localTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type Local struct {
// what we should tell people to connect to
PublicAddress string `version[0]:""`

MaxConnectionsPerIP int `version[3]:"30"`
MaxConnectionsPerIP int `version[3]:"30" version[27]:"15"`

// 0 == disable
PeerPingPeriodSeconds int `version[0]:"0"`
Expand All @@ -76,8 +76,8 @@ type Local struct {

// IncomingConnectionsLimit specifies the max number of long-lived incoming
// connections. 0 means no connections allowed. Must be non-negative.
// Estimating 5MB per incoming connection, 5MB*800 = 4GB
IncomingConnectionsLimit int `version[0]:"-1" version[1]:"10000" version[17]:"800"`
// Estimating 1.5MB per incoming connection, 1.5MB*2400 = 3.6GB
IncomingConnectionsLimit int `version[0]:"-1" version[1]:"10000" version[17]:"800" version[27]:"2400"`

// BroadcastConnectionsLimit specifies the number of connections that
// will receive broadcast (gossip) messages from this node. If the
Expand Down
4 changes: 2 additions & 2 deletions config/local_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var defaultLocal = Local{
ForceRelayMessages: false,
GossipFanout: 4,
HeartbeatUpdateInterval: 600,
IncomingConnectionsLimit: 800,
IncomingConnectionsLimit: 2400,
IncomingMessageFilterBucketCount: 5,
IncomingMessageFilterBucketSize: 512,
IsIndexerActive: false,
Expand All @@ -93,7 +93,7 @@ var defaultLocal = Local{
MaxAPIResourcesPerAccount: 100000,
MaxAcctLookback: 4,
MaxCatchpointDownloadDuration: 7200000000000,
MaxConnectionsPerIP: 30,
MaxConnectionsPerIP: 15,
MinCatchpointFileDownloadBytesPerSecond: 20480,
NetAddress: "",
NetworkMessageTraceServer: "",
Expand Down
4 changes: 2 additions & 2 deletions installer/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ForceRelayMessages": false,
"GossipFanout": 4,
"HeartbeatUpdateInterval": 600,
"IncomingConnectionsLimit": 800,
"IncomingConnectionsLimit": 2400,
"IncomingMessageFilterBucketCount": 5,
"IncomingMessageFilterBucketSize": 512,
"IsIndexerActive": false,
Expand All @@ -72,7 +72,7 @@
"MaxAPIResourcesPerAccount": 100000,
"MaxAcctLookback": 4,
"MaxCatchpointDownloadDuration": 7200000000000,
"MaxConnectionsPerIP": 30,
"MaxConnectionsPerIP": 15,
"MinCatchpointFileDownloadBytesPerSecond": 20480,
"NetAddress": "",
"NetworkMessageTraceServer": "",
Expand Down
4 changes: 2 additions & 2 deletions test/testdata/configs/config-v27.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"ForceRelayMessages": false,
"GossipFanout": 4,
"HeartbeatUpdateInterval": 600,
"IncomingConnectionsLimit": 800,
"IncomingConnectionsLimit": 2400,
"IncomingMessageFilterBucketCount": 5,
"IncomingMessageFilterBucketSize": 512,
"IsIndexerActive": false,
Expand All @@ -73,7 +73,7 @@
"MaxAPIBoxPerApplication": 100000,
"MaxAPIResourcesPerAccount": 100000,
"MaxCatchpointDownloadDuration": 7200000000000,
"MaxConnectionsPerIP": 30,
"MaxConnectionsPerIP": 15,
"MinCatchpointFileDownloadBytesPerSecond": 20480,
"NetAddress": "",
"NetworkMessageTraceServer": "",
Expand Down

0 comments on commit 8445d67

Please sign in to comment.