MySQL Native Replication vs Tungsten 1
MySQL Native Replication vs Tungsten
1
TopicsIn this short course we will:
• Features and limitations of Native MySQL Replication
• Explore Tungsten Replicator
• Review various Replicator Topologies
• Talk about Replication Filtering
• Learn about Tungsten Cluster
22
MySQL Native Replication
MySQL Native Replication
44
• It’s easy to setup and it’s free
• Embedded within MySQL Engine
• One-to-Many Topology only
• Parallel Threads by Schema
• Stale reads possible on slave
• No easy mechanism to failover
• Manual operation required to switch roles
• Only Basic Include/Exclude filtering available
• Many additional components required to function as a fully fault tolerant cluster
• MySQL to MySQL Only
Tungsten Replicator
Tungsten Replicator
66
• Open Source (free!!) and Commercial Builds available
• One-to-Many / Many-to-One Topologies
• Parallel Threads by Schema
• Complex filtering
• Heterogeneous replication– Extract from MySQL (Incl RDS and Google SQL) or Oracle
– Apply to MySQL (Incl RDS and Google SQL), Oracle, Redshift, Vertica, Hadoop, Mongo, Elasticsearch, Kafka (and more coming soon)
Tungsten Replicator – How it works
77
DBMS Logs
Download transactions via network
Apply using JDBC
THL = Events + Metadata
MySQL
MySQL Binary Logging
Option 1: Local InstallExtractor reads directly from the logs, even when the DBMS service is down. This is the default.
Option 2: RemoteExtractor gets log data via MySQL Replication Slave protocols (which requires the DBMS service to be online). This is how we handle RDS extraction tasks.
Extractor Options
Master Replicator: Extractor
THL
2 1Slave Replicator:
Applier
THL
MySQL
Tungsten Replicator - Topologies
88
Tungsten Replicator - Topologies
99
Tungsten Replicator – Complex Heterogeneous Topology
1010
Filtering with Tungsten Replicator
Types of Filters
1212
• Auditing – Can be used for tracking database updates
• Content – Modify contents of transactions, such as enumerating integers or remove columns, tables, or schemas
• Logging – Log information about transactions in replicator log file
• Optimization – Optimize statements and improve speed of updates on destination
• Transformation – Rename, reformat schemas and tables, even merge schemas into a single schema
• Validation – Validation and Consistency checking of data
• Miscellaneous – Others
• Over 40 filters included with Tungsten Replicator which can be ordered as desired!
Popular Filters
1313
• DatabaseTransform filter – rename databases or tables, supports regex
• InsertOnly filter – filter to include only “INSERT” events, ignoring others
• ReplicateColumn filter – replicate columns, either by inclusion or by exclusion
• Replicate filter - explicit inclusion or exclusion of schemas and tables to replicate. Can use wildcards
• SkipEventsByType filter – skip events for entire schemas or tables. For instance, skip all deletes to SALES.INVOICE
• TimeDelay filter – delays writing events to THL. Allows having a slave that is behind the master for a specified time period.
• SkipRowByData – replicate rows matching a condition
Tungsten Replicator - Filtering
1414
Master replicator
THL
Parallel Queue
(Events+ metadata)
Slave
Extract Filter Apply Extract Filter Apply Extract Filter Apply
Extract Filter Apply
Extract Filter Apply
StageStage Stage
Slave Replicator Pipeline
remote-to-thl thl-to-q q-to-dbms
Tungsten Cluster for HA/DR
Tungsten Cluster
1616
• Sits outside the MySQL Engine
• Uses Commercial release of Tungsten Replicator at its core
• Connector layer provides transparent read/write splitting
• Automatic Failover
• Simple, single command to switch masters
• Tungsten Replicator can be used to provide cluster-slaves
• Add/Remove nodes to scale reads
• Zero Downtime Maintenance
• Works with all “flavours” of MySQL (Community, Oracle, Percona and Maria)
• Multi-Master and Composite Topologies for expanding HA/DR capabilities
Tungsten Cluster Architecture
1717
Tungsten Multi-Site/Multi-Master Cluster Architecture
1818
Tungsten Cluster using Tungsten Replicator to Apply to a Cluster Slave
1919
Next Steps
• If you are interested in knowing more and would like to try it out for yourself, please contact our sales team who will be able to take you through the details and setup a POC –[email protected]
• Read the documentation at http://docs.continuent.com/
• Follow us on Social Media
– Facebook / Twitter / LinkedIn
– Tungsten University YouTube channel! http://tinyurl.com/TungstenUni
• Visit the events calendar on our website for upcoming Webinars and Training Sessions https://www.continuent.com/events/
2020
For more information, contact us:
MC BrownVP [email protected]
Chris ParkerDirector, Professional Services EMEA & [email protected]
Matthew LangDirector, Professional Services [email protected]
Eero TeerikorpiFounder, [email protected]+1 (408) 431-3305
Eric [email protected]