我有一个PHP应用程序。

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

我想加快我的申请速度。所以,最近我已经将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-4的问题,您需要完全依赖您的elasticsearch配置。您指出的内容将支持Elasticsearch配置。 Elasticsearch支持主数据故障转移。问题5非常复杂,您只需指出要平衡的主IP。 ES本身将根据节点可用性来完成诸如插入,搜索等操作。我们不必担心。
您能向我介绍问题6吗?

关于php - PHP Elasticsearch集群,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49236976/

10-17 03:04