From 5c21bdc1783e5cd17169436e7ccfacdd1b637907 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Wed, 23 May 2018 13:17:08 -0400 Subject: allow tuning *IdleConn* for intra-cluster messages (#8799) * allow tuning *IdleConn* for inter cluster messages * default MaxIdleConnsPerHost to 128 --- config/default.json | 5 ++++- model/config.go | 31 +++++++++++++++++++++++-------- 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 { -- cgit v1.2.3-1-g7c22