Static Connection Pool Slow

(Anton vanHooydonk) #1

Hello all,

I'm using a static connection pool with the .NET NEST client. I have 5 nodes in my cluster and I seed the connection pool with the IPs of the 5 nodes. All works fine when all five nodes are alive. However, if I take 2 nodes offline then the web app can take horribly long depending on which which node is selected for the query.

It seems to me like the pool is still trying to send queries to the offline nodes and is waiting for them them to timeout before moving on to the next node. The timeout takes up to a minute though.

How can the pool move on quicker, or not send requests to offline nodes at all?

            // static connection pool 
            var connectionPool = new StaticConnectionPool(new[] { 
                new Uri(""),
                new Uri(""),
                new Uri(""),
                new Uri(""),
                new Uri("") 
            // init connection settings
            var settings = new ConnectionSettings(connectionPool);                

            // return the new API client
            return new ElasticClient(settings);
        catch (Exception ex)
            throw ex;

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.