第30节 :_document查询内部原理

1、客户端发送请求到任意一个node,成为coordinate node

2、coordinate node对document进行路由,将请求转发到对应的node,此时会使用round-robin随机轮询算法,在primary shard以及其所有replica中随机选择一个,让读请求负载均衡

3、接收请求的node返回document给coordinate node

4、coordinate node返回document给客户端

5、特殊情况:document如果还在建立索引过程中,可能只有primary shard有,任何一个replica shard都没有,此时可能会导致无法读取到document,但是document完成索引建立之后,primary shard和replica shard就都有了

相关文章:

  • 2021-04-20
  • 2021-09-17
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2022-03-10
  • 2021-10-16
  • 2021-06-16
猜你喜欢
  • 2022-01-08
  • 2021-04-28
  • 2021-05-29
  • 2022-01-11
  • 2021-04-25
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案