by Gtids "Global transaction Identifiers", each transaction can be identified and can be traced and applied to any slave once it is committed, so that it does not need to rely on log file and location like Binarylog replication. Gtids is completely transaction-based, so that data consistency between master and slave can be guaranteed as long as all transactions committed at master commit on slave. You can use SBR or RBR-based gtids to achieve this. It is recommended to use RBR "row-based Replication".
1 Gtid Introduction
The uniqueness of Gtid, not only in master but only in the whole cluster.
Gtid is composed of sourceid:transaction_id; SourceID is used to identify the source server, the server_uuid[system variable];transaction_id in master, which is a sequence number generated in the order of transaction commits. If the first commit is 1, then its gtid=xxxxxxxxxxxx:1.
The Gtid is stored in the mysql.gtid_executed when gtid_mode=on/on_permissive.
MySQL Gtids-based replication