The application discloses a method and device for realizing strong consistency synchronization of an Elasticsearch cluster, and the method comprises the following steps: writing data into a master
shard of a master index to which a document belongs; after the data is written successfully, sending a write request to a node where a master
shard of a slave index to which the document belongs is located, regarding the master
shard of the slave index as a remote copy of the master shard of the master index, writing data into the remote copy, and realizing real-
time data synchronization; the master shard of the master index sends a segment file which has been landed on a disk to the remote copy, and analyzes storage information of actual data in the segment file; the master shard of the master index sends a translog log which has not been landed on a disk to the remote copy, so that the remote copy is restored to a data state consistent with the master shard, and historical
data recovery is realized. The method and device copy indexes in a remote cluster to a local cluster, ensure strong consistency of master-slave data, provide
high availability and fast
disaster recovery capability, and realize uninterrupted inter-cluster index migration.