summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-05-23 13:17:08 -0400
committerGitHub <noreply@github.com>2018-05-23 13:17:08 -0400
commit5c21bdc1783e5cd17169436e7ccfacdd1b637907 (patch)
treea1efbb2dbd29f47600014a1c9d6fb5d0c24e8296
parent0a666a56560713a084847ce683b940c1aa84acc0 (diff)
downloadchat-5c21bdc1783e5cd17169436e7ccfacdd1b637907.tar.gz
chat-5c21bdc1783e5cd17169436e7ccfacdd1b637907.tar.bz2
chat-5c21bdc1783e5cd17169436e7ccfacdd1b637907.zip
allow tuning *IdleConn* for intra-cluster messages (#8799)
* allow tuning *IdleConn* for inter cluster messages * default MaxIdleConnsPerHost to 128
-rw-r--r--config/default.json5
-rw-r--r--model/config.go31
2 files changed, 27 insertions, 9 deletions
diff --git a/config/default.json b/config/default.json
index c80ff48de..1c4608c03 100644
--- a/config/default.json
+++ b/config/default.json
@@ -323,7 +323,10 @@
"UseExperimentalGossip": false,
"ReadOnlyConfig": true,
"GossipPort": 8074,
- "StreamingPort": 8075
+ "StreamingPort": 8075,
+ "MaxIdleConns": 100,
+ "MaxIdleConnsPerHost": 128,
+ "IdleConnTimeoutMilliseconds": 90000
},
"MetricsSettings": {
"Enable": false,
diff --git a/model/config.go b/model/config.go
index 7a2125061..7c11860d2 100644
--- a/model/config.go
+++ b/model/config.go
@@ -460,14 +460,17 @@ func (s *ServiceSettings) SetDefaults() {
}
type ClusterSettings struct {
- Enable *bool
- ClusterName *string
- OverrideHostname *string
- UseIpAddress *bool
- UseExperimentalGossip *bool
- ReadOnlyConfig *bool
- GossipPort *int
- StreamingPort *int
+ Enable *bool
+ ClusterName *string
+ OverrideHostname *string
+ UseIpAddress *bool
+ UseExperimentalGossip *bool
+ ReadOnlyConfig *bool
+ GossipPort *int
+ StreamingPort *int
+ MaxIdleConns *int
+ MaxIdleConnsPerHost *int
+ IdleConnTimeoutMilliseconds *int
}
func (s *ClusterSettings) SetDefaults() {
@@ -502,6 +505,18 @@ func (s *ClusterSettings) SetDefaults() {
if s.StreamingPort == nil {
s.StreamingPort = NewInt(8075)
}
+
+ if s.MaxIdleConns == nil {
+ s.MaxIdleConns = NewInt(100)
+ }
+
+ if s.MaxIdleConnsPerHost == nil {
+ s.MaxIdleConnsPerHost = NewInt(128)
+ }
+
+ if s.IdleConnTimeoutMilliseconds == nil {
+ s.IdleConnTimeoutMilliseconds = NewInt(90000)
+ }
}
type MetricsSettings struct {