diff --git a/cmix/client.go b/cmix/client.go index a06e21f4d3a1c94e492a81ddd7bed6679a1547f9..996cacdb46016a7675cde906cbcd9c66dc68c766 100644 --- a/cmix/client.go +++ b/cmix/client.go @@ -147,6 +147,11 @@ func (c *client) initialize(ndf *ndf.NetworkDefinition) error { // Disable KeepAlive packets poolParams.HostParams.KaClientOpts.Time = time.Duration(math.MaxInt64) + // Configure the proxy error exponential moving average tracker + poolParams.HostParams.ProxyErrorMetricParams.Cutoff = 0.30 + poolParams.HostParams.ProxyErrorMetricParams.InitialAverage = + 0.75 * poolParams.HostParams.ProxyErrorMetricParams.Cutoff + // Enable optimized HostPool initialization poolParams.MaxPings = 50 poolParams.ForceConnection = true diff --git a/cmix/gateway/hostPool.go b/cmix/gateway/hostPool.go index 33bf7e9837fd51a9fa059cd3ddef7ae11158ced1..ca9e0c7b606cb50bd27e932f8da625fcc39aaae9 100644 --- a/cmix/gateway/hostPool.go +++ b/cmix/gateway/hostPool.go @@ -47,6 +47,7 @@ var errorsList = []string{ ndf.NO_NDF, "Host is in cool down", grpc.ErrClientConnClosing.Error(), + connect.TooManyProxyError, } // HostManager Interface allowing storage and retrieval of Host objects diff --git a/go.mod b/go.mod index 3e9394e23cb1ce9237a5562d3e59322c85d6c2e9..f1594495c9516fd0d6a4586c377e8810f976a8bb 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ require ( gitlab.com/elixxir/crypto v0.0.7-0.20220606201132-c370d5039cea gitlab.com/elixxir/ekv v0.1.7 gitlab.com/elixxir/primitives v0.0.3-0.20220606195757-40f7a589347f - gitlab.com/xx_network/comms v0.0.4-0.20220315161313-76acb14429ac + gitlab.com/xx_network/comms v0.0.4-0.20220630163702-f3d372ef6acd gitlab.com/xx_network/crypto v0.0.5-0.20220606200528-3f886fe49e81 - gitlab.com/xx_network/primitives v0.0.4-0.20220324193139-b292d1ae6e7e + gitlab.com/xx_network/primitives v0.0.4-0.20220630163313-7890038258c6 go.uber.org/ratelimit v0.2.0 golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 diff --git a/go.sum b/go.sum index 88d420c80a70e484ea4ed24885df87c44823b307..8d1e3fc2d22efad52720f2a922b18426b5ced73f 100644 --- a/go.sum +++ b/go.sum @@ -292,8 +292,9 @@ gitlab.com/elixxir/primitives v0.0.3-0.20220323183834-b98f255361b8/go.mod h1:MtF gitlab.com/elixxir/primitives v0.0.3-0.20220606195757-40f7a589347f h1:CTf2+ewHWYrzp5Ar3RwNvHePfTHyFniJTVjFW4zqoaE= gitlab.com/elixxir/primitives v0.0.3-0.20220606195757-40f7a589347f/go.mod h1:9Bb2+u+CDSwsEU5Droo6saDAXuBDvLRjexpBhPAYxhA= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= -gitlab.com/xx_network/comms v0.0.4-0.20220315161313-76acb14429ac h1:+ykw0JqLH/qMprPEKazGHNH8gUoHGA78EIr4ienxnw4= gitlab.com/xx_network/comms v0.0.4-0.20220315161313-76acb14429ac/go.mod h1:isHnwem0v4rTcwwHP455FhVlFyPcHkHiVz+N3s/uCSI= +gitlab.com/xx_network/comms v0.0.4-0.20220630163702-f3d372ef6acd h1:qYR2V/8KliGyJ2clWpVYhpgwpnfS1MXGpAbrFoOkSWk= +gitlab.com/xx_network/comms v0.0.4-0.20220630163702-f3d372ef6acd/go.mod h1:TraR4sW+YxK/2CV+IQUNaAV61+ElrBV0kXd5HLEjM7M= gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= gitlab.com/xx_network/crypto v0.0.5-0.20220222212031-750f7e8a01f4/go.mod h1:6apvsoHCQJDjO0J4E3uhR3yO9tTz/Mq5be5rjB3tQPU= @@ -305,8 +306,9 @@ gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK gitlab.com/xx_network/primitives v0.0.2/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc= gitlab.com/xx_network/primitives v0.0.4-0.20220222211843-901fa4a2d72b/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE= gitlab.com/xx_network/primitives v0.0.4-0.20220317172007-4d2a53e6e669/go.mod h1:AXVVFt7dDAeIUpOGPiStCcUIKsBXLWbmV/BgZ4T+tOo= -gitlab.com/xx_network/primitives v0.0.4-0.20220324193139-b292d1ae6e7e h1:F651DdbU9n5qOLN8rdyAIluXWtm5Wl4jwH5D6ED3bSI= gitlab.com/xx_network/primitives v0.0.4-0.20220324193139-b292d1ae6e7e/go.mod h1:AXVVFt7dDAeIUpOGPiStCcUIKsBXLWbmV/BgZ4T+tOo= +gitlab.com/xx_network/primitives v0.0.4-0.20220630163313-7890038258c6 h1:3It6ILDHn/9J/Oi7MfMjkidKPe7vbFCy5JQtXx8EfYM= +gitlab.com/xx_network/primitives v0.0.4-0.20220630163313-7890038258c6/go.mod h1:AXVVFt7dDAeIUpOGPiStCcUIKsBXLWbmV/BgZ4T+tOo= gitlab.com/xx_network/ring v0.0.3-0.20220222211904-da613960ad93 h1:eJZrXqHsMmmejEPWw8gNAt0I8CGAMNO/7C339Zco3TM= gitlab.com/xx_network/ring v0.0.3-0.20220222211904-da613960ad93/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=