How to work with an ElasticSearch and NEST cluster?

I really like the NEST API and of course ElasticSearch. A big part of the appeal is the ability to scale the cluster very easily. I have 3 nodes consisting of 1 master and 2 readable slaves. Does the NEST client provide any support for load balancing and cluster failover?

+3


source to share


1 answer


No, by choice.

Loadbalancing is based on many heuristics that differ for each application. Many installations already have hardware / software balancers in front of the elasticsearch cluster.

In addition to this elasticsearch is already load balancing, so even if the client clicks on one node all the time, the cluster can allow other nodes to coordinate searches.

Of course, fault tolerance is something that needs to be handled in the application (unless hardware / balancers take care of this), I could release a simple implementation as a separate nuget package that can contain a pool of clients but for now my main focus is on NEST polish API to be stable / fully documented.

UPDATE 2014



Since the rollout cluster of the NEST 1.0 cluster and connection pooling are built into the client:

var node = new Uri("http://mynode.example.com:8082/apiKey");
var connectionPool = new SniffingConnectionPool(new[] { node1, node2, node3 });
var config = new ConnectionConfiguration(connectionPool);
var client = new ElasticsearchClient(config);

      

http://nest.azurewebsites.net/elasticsearch-net/cluster-failover.html

http://nest.azurewebsites.net/elasticsearch-net/connecting.html

http://nest.azurewebsites.net/nest/connecting.html

+5


source







All Articles