# Passing a list of Connections

**URL:** <https://discuss.elastic.co/t/passing-a-list-of-connections/27415>\
**Category:** Elasticsearch\
**Created:** [August 14, 2015, 3:54pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415 "2015-08-14T15:54:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [August 14, 2015, 3:54pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/1 "2015-08-14T15:54:30Z")

</div>

I'm using [ElasticSearch.net](http://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?

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [August 15, 2015, 5:58am UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/2 "2015-08-15T05:58:12Z")

</div>

Example: [http://nest.azurewebsites.net/elasticsearch-net/connecting.html](http://nest.azurewebsites.net/elasticsearch-net/connecting.html)

---

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [August 17, 2015, 1:27pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/3 "2015-08-17T13:27:21Z")

</div>

That example does not show a list of IP's

What happens if:

Uri("[http://mynode.example.com:8082/apiKey](http://mynode.example.com:8082/apiKey)"); Is down?

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [August 17, 2015, 1:41pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/4 "2015-08-17T13:41:32Z")

</div>

it talks about connection pool which takes list of Uris :

> var node = new Uri("[http://mynode.example.com:8082/apiKey](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.

---

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [August 17, 2015, 5:26pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/5 "2015-08-17T17:26:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [August 17, 2015, 5:48pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/6 "2015-08-17T17:48:26Z")

</div>

Uri node1 = new Uri("[http://10.0.0.1:9200/](http://10.0.0.1:9200/)");  
Uri node2 = new Uri("[http://10.0.0.2:9200/](http://10.0.0.2:9200/)");  
var connectionPool = new SniffingConnectionPool(new[] { node1, node2 });  
var config = new ConnectionConfiguration(connectionPool);  
var client = new ElasticsearchClient(config);

---

<div class="post-metadata">

**Author:** ![Garrett\_Johnson](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@Garrett\_Johnson](https://discuss.elastic.co/u/Garrett_Johnson)\
**Post date:** [August 17, 2015, 5:49pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/7 "2015-08-17T17:49:51Z")

</div>

Thanks 😄

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:55pm UTC](https://discuss.elastic.co/t/passing-a-list-of-connections/27415/8 "2017-07-05T23:55:28Z")

</div>


