allow tuning *IdleConn* for intra-cluster messages (#8799)
* allow tuning *IdleConn* for inter cluster messages * default MaxIdleConnsPerHost to 128
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0a666a5656
Коммит
5c21bdc178
@@ -323,7 +323,10 @@
|
|||||||
"UseExperimentalGossip": false,
|
"UseExperimentalGossip": false,
|
||||||
"ReadOnlyConfig": true,
|
"ReadOnlyConfig": true,
|
||||||
"GossipPort": 8074,
|
"GossipPort": 8074,
|
||||||
"StreamingPort": 8075
|
"StreamingPort": 8075,
|
||||||
|
"MaxIdleConns": 100,
|
||||||
|
"MaxIdleConnsPerHost": 128,
|
||||||
|
"IdleConnTimeoutMilliseconds": 90000
|
||||||
},
|
},
|
||||||
"MetricsSettings": {
|
"MetricsSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
|
|||||||
@@ -460,14 +460,17 @@ func (s *ServiceSettings) SetDefaults() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ClusterSettings struct {
|
type ClusterSettings struct {
|
||||||
Enable *bool
|
Enable *bool
|
||||||
ClusterName *string
|
ClusterName *string
|
||||||
OverrideHostname *string
|
OverrideHostname *string
|
||||||
UseIpAddress *bool
|
UseIpAddress *bool
|
||||||
UseExperimentalGossip *bool
|
UseExperimentalGossip *bool
|
||||||
ReadOnlyConfig *bool
|
ReadOnlyConfig *bool
|
||||||
GossipPort *int
|
GossipPort *int
|
||||||
StreamingPort *int
|
StreamingPort *int
|
||||||
|
MaxIdleConns *int
|
||||||
|
MaxIdleConnsPerHost *int
|
||||||
|
IdleConnTimeoutMilliseconds *int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ClusterSettings) SetDefaults() {
|
func (s *ClusterSettings) SetDefaults() {
|
||||||
@@ -502,6 +505,18 @@ func (s *ClusterSettings) SetDefaults() {
|
|||||||
if s.StreamingPort == nil {
|
if s.StreamingPort == nil {
|
||||||
s.StreamingPort = NewInt(8075)
|
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 {
|
type MetricsSettings struct {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user