125
pages
English
Documents
Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres
125
pages
English
Documents
Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres
Publié par
Langue
English
MySQL
Replication
Tutorial
Mats Kindahl
Senior Software Engineer
Replication Technology
Lars Thalmann
Development Manager
Replication/BackupTutorial Outline
Terminology and Basic Concepts
Basic Replication
Replication for scale-out
Replication for high-availability
The binary log
Statements and transactions
Cluster ReplicationTerminology and
Basic ConceptsMySQL Replication
How?Why?
High availability Snapshots
Fail-over possible Backup
Scale-out mysqlbinlog
Queries on many mysqldumpservers
Binary logOff-site processing
Do not disturb master Replication
Reporting Point-in-time
recoveryMMyySSQQLL Server
Terminology
MasterMaster server
Changes data
Keeps log of changes
Replication
Slave server
Ask master for events
Executes events
SlaveBinary log
Log every change
Split into transactional groupsMaster MySQL ServerMMyySSQQLL Server
Terminology
MasterSynchronous replication
Transactions are not committed
until data is replicated and applied
Provides consistency, but slower
Replication
Provided by MySQL Cluster
Asynchronous replication
Transactions committed
immediately and replicated Slave
No consistency, but faster
Provided by MySQL ServerresbdeSlIinasum/QyslOoi Lonpglog
Replication system architecture
SlaveMaster
Session Dump I/O SQL
Binary log Relay log
Binary log (binlog) records all changes
Consists of transactional groups
Used for replication and point-in-time
recoveryresbdeSlIinasum/QyslOoi Lonpglog
Replication system architecture
SlaveMaster
Session Dump I/O SQL
Binary log Relay log
One dump thread per slave
Started on request from slave
Read events from binary log and send to
slaveresbdeSlIinasum/QyslOoi Lonpglog
Replication system architecture
SlaveMaster
Session Dump I/O SQL
Binary log Relay log
I/O thread send dump request to master
I/O thread copies events to relay log
Relay log is a disk-based buffer for events
Relay log should be considered volatileresbdeSlIinasum/QyslOoi Lonpglog
Replication system architecture
SlaveMaster
Session Dump I/O SQL
Binary log Relay log
SQL thread read events from relay log
SQL thread decodes and applies events to
database