summaryrefslogtreecommitdiffstats
path: root/model/config.go
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 /model/config.go
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
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go31
1 files changed, 23 insertions, 8 deletions
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 {