# How to work with 2 Client only nodes?

**URL:** <https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371>\
**Category:** Elasticsearch\
**Created:** [August 14, 2015, 6:52am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371 "2015-08-14T06:52:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [August 14, 2015, 6:52am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371/1 "2015-08-14T06:52:24Z")

</div>

Hi,

We are using elasticsearch for only searching purpose, our topology is

3 Master+Data nodes and 2 Client only nodes (Load Balancer)

say now  
my 1st client node has IP x.x.x.x  
and my 2nd client node has IP y.y.y.y

In my PHP ESClient do i need to specify IP address of these 2 clients or i need to specify only one clients IP address and ES will automatically handle the scenario where if one client node goes down the other will take over it (and we wont have any downtime).

Please we need your help  
kindly ES community help us.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 14, 2015, 7:12am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371/2 "2015-08-14T07:12:58Z")

</div>

You need to specify the IP addresses of both client nodes.

---

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [August 14, 2015, 7:37am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371/3 "2015-08-14T07:37:58Z")

</div>

```
$esconfig = ['hosts' => [ SEARCHIP_1 . ":" . 9200, SEARCHIP_2 . ":" . 9200], 'logging' => false, 'logPath' => LOGFILE, 'logPermission' => 0664 ];

$client = new Elasticsearch\Client($esconfig);

```

Is it correct?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 14, 2015, 8:15am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371/4 "2015-08-14T08:15:12Z")

</div>

I don't know PHP or the client library, but it looks reasonably correct.

---

<div class="post-metadata">

**Author:** ![N\_M\_10](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@N\_M\_10](https://discuss.elastic.co/u/N_M_10)\
**Post date:** [August 14, 2015, 10:33am UTC](https://discuss.elastic.co/t/how-to-work-with-2-client-only-nodes/27371/5 "2015-08-14T10:33:03Z")

</div>

cool then thanks for the help

---

<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/how-to-work-with-2-client-only-nodes/27371/6 "2017-07-05T23:55:48Z")

</div>


