Skip to content

Commit

Permalink
default transport is too weak
Browse files Browse the repository at this point in the history
  • Loading branch information
jie committed Oct 11, 2023
1 parent 3be4148 commit 051f076
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion gossiper/gossiper_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ func StartGossiperServer(c *GossiperContext) {
// Check if the storage file exists in this directory
//InitializeGossiperStorage(c)
// Create the http client to be used.
tr := &http.Transport{}
tr := &http.Transport{
MaxIdleConnsPerHost: 3000,
MaxConnsPerHost: 3000,
ExpectContinueTimeout: 10,
}
c.Client = &http.Client{
Transport: tr,
}
Expand Down
6 changes: 5 additions & 1 deletion monitor/monitor-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ func StartMonitorServer(c *MonitorContext) {
time.Sleep(time.Duration(time_wait) * time.Second)
}
time.Sleep(time.Duration(c.Clockdrift_miliseconds) * time.Millisecond)
tr := &http.Transport{}
tr := &http.Transport{
MaxIdleConnsPerHost: 3000,
MaxConnsPerHost: 3000,
ExpectContinueTimeout: 10,
}
c.Client = &http.Client{
Transport: tr,
}
Expand Down

0 comments on commit 051f076

Please sign in to comment.