[Elasticsearch] Elasticsearch write consistency

Insert picture description here

1 Overview

1.1 Addition, deletion and modification process

  1. The client and any node (assuming Node1) make a request, this node is the coordinating node (coordinating node)
  2. Coordinating node, route the document, and forward the request to the corresponding node (there is a primary shard, assuming it is Node2)
  3. The primary shard on Node2 processes the request and then synchronizes the data to the replica node
  4. Coordinating node, if it is found that the primary node and all replica nodes are settled, the response result is returned to the client

1.2 What is consistency?

In a distributed environment, consistency refers to whether multiple data copies can maintain consistent characteristics.

Under the condition of consistency, the system can transfer from the consistency state to another consistency state after performing data update operations.

After a data update to the system is successful, if all users can read the latest value, the system is considered to have strong consistency.

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/108905780