Writing data process Elasticsearch

1. The client sends a request to select a node in the past, is the node  coordinating node(coordinator node).

2. coordinating node to carry out document route , forwards the request to the corresponding node (with a primary shard).

On node 3. The actual  primary shard processing request, and then to the data synchronization  replica node.

4.coordinating node If it is found  primary node and all  replica node after all set, the result is returned in response to the client.

Explain the concept:

Coordinating node: when a search request is sent to a node, which becomes a coordinator node (Coordinating Node). All nodes in the cluster es When the coordinator node can be a major role in the forwarding request, the request response processing light operating default.

 primary shard和 replica shard:replica shard is the primary shard copy, responsible for fault tolerance, load and bear a read request.

primary shard and a replica shard and its replica shard can not be placed in a node (this provision is to avoid node goes down when, primary shard and a replica shard data are lost, would not achieve the role of fault-tolerant), but other the primary shard of replica shard on the same node.

 

Published 79 original articles · won praise 48 · views 90000 +

Guess you like

Origin blog.csdn.net/bianyamei/article/details/50385316