How to work with 2 Client only nodes?


(NM) #1

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.


(Magnus Bäck) #2

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


(NM) #3
$esconfig = [ 'hosts' => [ SEARCHIP_1 . ":" . 9200,  SEARCHIP_2 . ":" . 9200], 'logging' => false, 'logPath' => LOGFILE, 'logPermission' => 0664 ];

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

Is it correct?


(Magnus Bäck) #4

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


(NM) #5

cool then thanks for the help


(system) #6