PHP Elasticsearch集群

时间:2018-03-12 13:54:30

标签: php elasticsearch

我有一个PHP应用程序。

它使用弹性搜索进行搜索(搜索,插入)操作。

我想加快申请速度。所以,最近我把ElasticSearch变成了聚类概念 (共有3个节点 - 数据节点也是:03)

初始节点:node-1

新节点:node-2,node-3

在我的应用程序中,我已将php配置为连接到我的代码中的一个ES(node-1)。

我需要知道,

   1) Is it enough to point one of the ES clustering node among ( node1, node2 , node3 ) in the PHP configurations ?
   2) Will itself do some internal process to split the requests based on load
   3) What are all the internal process ( php -> ES clustering )?
   4) Do i need to give the all the IP in PHP configurations 
    Or
   5) I need to mention for insert it should go to node-1 for search it should go to node-2 like that for proper functioning / speed up the process 

   6) How do i know which request goes to which node ?

1 个答案:

答案 0 :(得分:-1)

要回答1-4的问题,您需要完全依赖于弹性搜索配置。您指出的内容将支持elasticsearch配置。 Elasticsearch支持主数据故障转移。问题5是退出复杂的,你可以简单地指出主IP进行平衡。插入,搜索等操作将由ES本身根据节点可用性完成。我们不用担心。 你能否向我介绍问题6?