I'm using ElasticSearch.net and playing around with Connection Pooling Sniffing etc.
Looking at the docs I don't know how to tell it a list of URi's ...
If I choose just one URI and it is dead how would it figure out the rest?
I'm using ElasticSearch.net and playing around with Connection Pooling Sniffing etc.
Looking at the docs I don't know how to tell it a list of URi's ...
If I choose just one URI and it is dead how would it figure out the rest?
That example does not show a list of IP's
What happens if:
Uri("http://mynode.example.com:8082/apiKey"); Is down?
it talks about connection pool which takes list of Uris :
var node = new Uri("http://mynode.example.com:8082/apiKey");
var connectionPool = new SniffingConnectionPool(new { node });
var config = new ConnectionConfiguration(connectionPool);
var client = new ElasticsearchClient(config);
basically you provide multiple URIs each reflecting ur client node and do the right setting so NEST takes care of load balance and fault tolerance.
My question is exactly how to do that?
Providing an example that Shows 1 Uri for a setup specifically used for multiple Uri's seems counter intuitive.
Is it a comma separated list, semicolon separated. Since it is a var who knows what node is?
The example isn't clear to me anyway on how to add multiples.
Uri node1 = new Uri("http://10.0.0.1:9200/");
Uri node2 = new Uri("http://10.0.0.2:9200/");
var connectionPool = new SniffingConnectionPool(new[] { node1, node2 });
var config = new ConnectionConfiguration(connectionPool);
var client = new ElasticsearchClient(config);
Thanks
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.