basics : simple replicator installation extract from...

16
Basics : Simple Replicator Installation Extract from MySQL

Upload: others

Post on 03-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Basics : Simple Replicator InstallationExtract from MySQL

Page 2: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Topics

In this short course we will:

• Review the Replicator

• Review prerequisites required

• Discuss installation Methods– Staging vs INI

• Walkthrough an Installation (Full end to end demo)

• Recap Key Resources and Tools

Course Prerequisite Learning– Basics: Introduction to Tungsten Replicator– Visit Continuent website or Tungsten University on YouTube to watch these recordings

2

Page 3: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Tungsten Replicator Architecture

Page 4: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Tungsten Replicator

4

DBMS Logs

MySQL/Oracle

Master Replicator: Extractor

THL

Slave Replicator: Applier

THL

MySQL/Oracle

T

THL

T

Page 5: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Key Decisions and Prerequisites

Page 6: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Pre Installation Environment Decisions

• Which release of MySQL?– MySQL Community– Percona– MariaDB– Oracle MySQL Enterprise

• Which version?– 5.0 to 5.7

• What monitoring tools do you have?• Full or Partial Replication• What backup tools do you have?

6

Page 7: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Prerequisities

• Review docs– http://docs.continuent.com/tungsten-replicator-5.3/prerequisite.html

• Host Prerequisites– OS user– /etc/hosts– sudoers and ssh– Ruby– Java

• Network Prerequisites– Review port requirements

• MySQL Prerequisites– my.cnf settings– tungsten user accounts

7

Page 8: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Pre Installation Tungsten Decisions

• TAR file or RPM?• INI-based install or staging install?• SSL Enabled?

8

Page 9: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Installation Methods: ini vs staging

• INI-based Install– Install managed via /etc/tungsten/tungsten.ini on EACH host– PROS

• Control over each node individually• Easy integration to automation software such as puppet and chef• Remove dependency on single host for install

– CONS• Configuration changes must be performed individually• Risk of misconfiguration between nodes

9

Page 10: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Installation Methods: ini vs staging

• Staging Install– Install managed from one host– Could be a source/target node or a separate host outside of replication.– PROS

• One single place for configuration• Easy to install/update entire topology in one go• Configuration applied to all nodes, less risk of misconfiguration

– CONS• No easy integration to automation software• Staging host become single point of failure for configuration management

– Especially important if Staging host is a DB Node

10

Page 11: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Installation Demo

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

Page 12: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Command Line Tools&

Resources

Page 13: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Tools : trepctl

13

• “trepctl status” can be run from any node to view the status of the local replicator

• “trepctl status –r 3” will show status output refreshed every 3 second until CTRL+C

• “trepctl qs” provides a quick summary overview of the local replicator

• “trepctl perf” provides deeper diagnostics of the different stages in the replicators

$ trepctl qsState: east Online for 21.069s, running for 45.654sLatency: 0.837s from DB commit time on db1 into THL

21.839s since last database commitSequence: 1 last applied, 0 transactions behind (0-1 stored) estimate 0.00s before synchronization

Page 14: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Log Files

14

• The /opt/continuent/service_logs/ directory contains both text files and symbolic links.

• Links in the service_logs directory go to following subdirectory:– /opt/continuent/tungsten/tungsten-replicator/log/

tungsten@db1:/opt/continuent/service_logs $ lltotal 116lrwxrwxrwx 1 tungsten tungsten 60 Jan 06 09:52 trepsvc.log -> /opt/continuent/tungsten/tungsten-replicator/log/trepsvc.log

Page 15: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

Next Steps

• If you are interested in knowing more about the software 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/tungsten-replicator-5.3/index.html

• Subscribe to our Tungsten University YouTube channel! http://tinyurl.com/TungstenUni

• Visit the events calendar on our website for upcoming Webinars and Training Sessions

15

Page 16: Basics : Simple Replicator Installation Extract from MySQLcontinuent-videos.s3.amazonaws.com/...Install-MySQL... · –CONS •Configuration ... –Install managed from one host –Could

For more information, contact us:

Eric [email protected]

MC BrownVP [email protected]

Chris ParkerDirector, Professional Services EMEA & [email protected]

Eero TeerikorpiFounder, [email protected]+1 (408) 431-3305