[es Synchronize Database Mode] Realize ES and MySQL database synchronization solution

Using a timer (using SQL to query data for synchronization), the implementation is relatively simple.

Real-time, the message is put in MQ, consumers will automatically consume, the complexity is higher.

The MQ method maintains strong data consistency because MQ can automatically retry and compensate. But logstash cannot achieve compensation and retry.

It is not possible to add data flexibly. For example, after you perform some aggregation, query and other operations on the data added to mysql, you can add it to es.

It is easier to implement, but the real-time performance is not strong and the fault tolerance rate is low.

Recommended solution: Second, because MQ can achieve high availability and information persistence without losing messages, it is difficult for the consumer to add failures, and failures can also be processed after logging.

Guess you like

Origin www.cnblogs.com/sqlserver-mysql/p/12716192.html