主从互通
最后更新于:2022-04-01 00:38:58
### 主从库之间是如何通信的
For explanation purposes, let's imagine that we have a clusterconsisting of 3 nodes. It contains one index called `blogs` which hastwo primary shards. Each primary shard has two replicas. Copies ofthe same shard are never allocated to the same node, so our clusterlooks something like <>.
[[img-distrib]].A cluster with three nodes and one indeximage::images/04-01_index.png["A cluster with three nodes and one index"]
We can send our requests to any node in the cluster. Every node is fullycapable of serving any request. Every node knows the location of everydocument in the cluster and so can forward requests directly to the requirednode. In the examples below, we will send all of our requests to `Node 1`,which we will refer to as the _requesting node_.
TIP: When sending requests, it is good practice to round-robin through all thenodes in the cluster, in order to spread the load.