How to work with 2 Client only nodes?


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.

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

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

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

Is it correct?

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

1 Like

cool then thanks for the help