When you installed the Debezium MySQL connector, then it’ll start
read your historical data and push all of them into the Kafka
topics. This setting can we changed via
snapshot.mode parameter in the connector. But if you
are going to start a new sync, then Debezium will load the
existing data its called Snapshot. Unfortunately, if you have a
busy transactional MySQL database, then it may lead to some
performance issues. And your DBA will never agree to read the
data from Master Node.[Disclaimer: I’m a DBA :) ]. So I was
thinking of figuring out to take the snapshot from the Read
Replica, once the snapshot is done, then start read the realtime
data from the Master. I found this useful information in a
StackOverflow answer.
If your binlog uses GTID, you should be able to make a CDC tool like Debezium read the snapshot from the replica, then when that’s done, switch to the master to read the binlog. But if you don’t use …
[Read more]