SlideShare uma empresa Scribd logo
1 de 88
Baixar para ler offline
Building simple
                                                                                  and complex
                                                                               replication clusters
                                                                                 with Tungsten
 Giuseppe Maxia                                                                     Replicator
 QA Director
 Continuent, Inc
           @datacharmer
   ©Continuent 2012.                                                             1

                          This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.
Tuesday, February 7, 12                                                                                                    1
From the user's
                     standpoint




Tuesday, February 7, 12              2
transaction
                                                                              transaction
                                                             MySQL              transaction
                                                                            transaction
                                                                                  transaction
                                                             DBMS             transaction
                                                                                    transaction
                                                                                transaction
                                                                                      transaction
                                                                                  transaction
                                                                                    transaction
                                                                                      transaction



                                                      BINARY LOG




                              ns act act tio n
                          tra ansio ns sac ntio
                                ac ion ion n
                                               ac
                              nr tr tra aniton
                              tsa a n csio
                                       nts ct n
                                    rn a o
                                   taa scti
                                         r
                                  trnsa



                                       n
                                       n
                                                                     MySQL replication
                                   tio
                                  ct
                                tra

                          tra
                          REPLICATION
                                        transaction
                                        transaction
                                                                     is single threaded




                                    MySQL
                                    DBMS




Tuesday, February 7, 12                                                                             3
master                             master     master      master
                          MySQL                         MySQL     MySQL       MySQL
                          DBMS                          DBMS      DBMS        DBMS




        MySQL               MySQL   MySQL                           MySQL
        DBMS                DBMS    DBMS                            DBMS




     slave                  slave   slave                            slave


           single source                                   multi source (fan-in)

                                            multiple sources?
Tuesday, February 7, 12                                                               4
from this                        to this
                                                   MySQL             MySQL
                                                   DBMS              DBMS




                                                  master             master




                                                   MySQL             MySQL
                                                   DBMS              DBMS




                                                  master             master



                                      multiple masters?

Tuesday, February 7, 12                                                       5
INSERT                                        INSERT
         RECORD                                        RECORD
            A                                             A
                           MySQL              MySQL
                           DBMS               DBMS




                          master              master




                           MySQL              MySQL
                           DBMS               DBMS




         MODIFY           master              master   MODIFY
         RECORD                                        RECORD
            B                                             B
                              Avoiding conflicts?

Tuesday, February 7, 12                                          6
master
                                                    Seamless failover?
                    MySQL
                    DBMS

                                           master
                                            MySQL
                                            DBMS




                                                                         master
                                                                           MySQL
                                                                           DBMS




     MySQL                MySQL
     DBMS                 DBMS




  slave                   slave    MySQL
                                   DBMS
                                              MySQL
                                              DBMS




                                  slave       slave
                                                                 MySQL     MySQL
                                                                 DBMS      DBMS




                                                                slave      slave
Tuesday, February 7, 12                                                            7
Replicating to something else?


                             mysql master
                                   MySQL
                                   DBMS




                           MySQL
                           DBMS




                          mysql postgresql oracle   mongodb


Tuesday, February 7, 12                                       8
All these examples tell us:

       Nice dream, but MySQL
             can’t do it
Tuesday, February 7, 12          9
Enter Tungsten Replicator




Tuesday, February 7, 12                               10
http://code.google.com/p/tungsten-replicator




                                      Open Source
                                      100% GPL v2



Tuesday, February 7, 12                                11
What can it do?
                • Easy failover
                • Multiple masters
                • Multiple sources to a single slave
                • Conflict prevention
                • Parallel replication
                • Replicate to Oracle and PostgreSQL database
Tuesday, February 7, 12                                         12
master-slave      Heterogeneous        Direct slave
                                                                  Regular
                                                                  MySQL
                                MySQL          Oracle
                                                                  Master




                                Oracle         MySQL


                 fan-in slave        all-masters        star-schema




   ©Continuent 2012.


Tuesday, February 7, 12                                                     13
Main components
                     • Transaction History Logs (THL)
                          •   roughly corresponding to MySQL relay logs

                          •   have a lot of metadata

                     • Service database
                          •   contains metadata for latest transactions

                          •   Metadata is committed together with data

                          •   Makes slaves crash proof


Tuesday, February 7, 12                                                   14
Parallel replication




Tuesday, February 7, 12                          15
Parallel replication facts


                     ✓Sharded by database
                     ✓Good choice for slave lag problems
                     ❖Bad choice for single database projects


Tuesday, February 7, 12                                         16
Parallel Replication test

           STOPPED



                                                      binary logs

   MySQL slave                                       Concurrent sysbench
                                                       on 30 databases
                                                      running for 1 hour
                                OFFLINE
                                                     TOTAL DATA: 130 GB
          Tungsten slave             direct:
                                      alpha
                                                     RAM per server: 20GB
                                     (slave)

                                 replicator alpha

                                                    Slaves will have 1 hour lag
Tuesday, February 7, 12                                                           17
measuring results

               START



                                                 binary logs

   MySQL slave

                             ONLINE                             Recording
                                                               catch-up time
          Tungsten slave          direct:
                                   alpha
                                  (slave)

                              replicator alpha




Tuesday, February 7, 12                                                        18
MySQL native
                           replication


              slave catch up in 04:29:30



Tuesday, February 7, 12                    19
Tungsten parallel
                             replication


              slave catch up in 00:55:40



Tuesday, February 7, 12                       20
Parallel replication made simpler




                          FROM HERE ....
Tuesday, February 7, 12                              21
Parallel replication made simpler




                          TO HERE
Tuesday, February 7, 12                              22
Parallel replication made simpler




Tuesday, February 7, 12                              23
parallel replication
                           direct slave facts




Tuesday, February 7, 12                          24
parallel replication
                           direct slave facts
     ✓No need to install Tungsten on the master




Tuesday, February 7, 12                           24
parallel replication
                           direct slave facts
     ✓No need to install Tungsten on the master
     ✓Tungsten runs only on the slave




Tuesday, February 7, 12                           24
parallel replication
                           direct slave facts
     ✓No need to install Tungsten on the master
     ✓Tungsten runs only on the slave
     ✓Replication can revert to native slave with two
             commands (trepctl offline; start
             slave)




Tuesday, February 7, 12                                 24
parallel replication
                           direct slave facts
     ✓No need to install Tungsten on the master
     ✓Tungsten runs only on the slave
     ✓Replication can revert to native slave with two
             commands (trepctl offline; start
             slave)

     ✓Native replication can continue on other slaves

Tuesday, February 7, 12                                 24
parallel replication
                           direct slave facts
     ✓No need to install Tungsten on the master
     ✓Tungsten runs only on the slave
     ✓Replication can revert to native slave with two
             commands (trepctl offline; start
             slave)

     ✓Native replication can continue on other slaves
     ❖Failover (either native or Tungsten) becomes a
             manual task
Tuesday, February 7, 12                                 24
Multiple masters




Tuesday, February 7, 12                      25
multiple masters


                     • Tungsten Replicator recipe: use more
                          services




Tuesday, February 7, 12                                       26
Bi-directional replication




Tuesday, February 7, 12                                27
Bi-directional replication with slaves




Tuesday, February 7, 12                         28
Multiple sources




Tuesday, February 7, 12                      29
multiple sources


                     • Tungsten Replicator recipe is still valid:
                          use more services




Tuesday, February 7, 12                                             30
Multiple source replication




Tuesday, February 7, 12                                 31
Multiple masters replication: 3 nodes




Tuesday, February 7, 12                      32
Multiple masters replication: 4 nodes




Tuesday, February 7, 12                      33
star topologies




Tuesday, February 7, 12                     34
Conflict prevention




Tuesday, February 7, 12                         35
Conflict prevention
                                facts




Tuesday, February 7, 12                        36
Conflict prevention
                                facts
                     • Sharded by database




Tuesday, February 7, 12                        36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically




Tuesday, February 7, 12                        36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically
                     • Applied either at the master or at the
                          slave




Tuesday, February 7, 12                                         36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically
                     • Applied either at the master or at the
                          slave
                     • methods:


Tuesday, February 7, 12                                         36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically
                     • Applied either at the master or at the
                          slave
                     • methods:
                          •   make replication fail




Tuesday, February 7, 12                                         36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically
                     • Applied either at the master or at the
                          slave
                     • methods:
                          •   make replication fail

                          •   drop silently


Tuesday, February 7, 12                                         36
Conflict prevention
                                facts
                     • Sharded by database
                     • Defined dynamically
                     • Applied either at the master or at the
                          slave
                     • methods:
                          •   make replication fail

                          •   drop silently

                          •   drop with warning
Tuesday, February 7, 12                                         36
Tungsten Conflict prevention points
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S

Tuesday, February 7, 12                                                37
Tungsten Conflict prevention points
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S

Tuesday, February 7, 12                                                37
Tungsten Conflict prevention points
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S

Tuesday, February 7, 12                                                37
Prevention methods: Fail on master
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S

Tuesday, February 7, 12                                                38
INSERT A
        x,y
                              Prevention methods: Fail on master
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S
                                       INSERT A
                                          x,z
Tuesday, February 7, 12                                                38
INSERT A
        x,y
                              Prevention methods: Fail on master
                          host1
                                                               host3



                          M       S
                                                          S



                          host2                                host4
                              master

                          S       M                        S
                                       INSERT A
                                          x,z
Tuesday, February 7, 12                                                38
Prevention methods: Fail on slave
                          host1
                                                                host3



                          M       S
                                                           S



                          host2                                 host4
                              master

                          S       M                         S

Tuesday, February 7, 12                                                 39
INSERT A
        x,y
                               Prevention methods: Fail on slave
                          host1
                                                                host3



                          M       S
                                                           S



                          host2                                 host4
                              master

                          S       M                         S
                                        INSERT A
                                           x,z
Tuesday, February 7, 12                                                 39
INSERT A
        x,y
                               Prevention methods: Fail on slave
                          host1
                                                                host3



                          M       S
                                                           S



                          host2                                 host4
                              master

                          S       M                         S
                                        INSERT A
                                           x,z
Tuesday, February 7, 12                                                 39
Prevention methods: Fail on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                               host3
                              master

                          M                               S

Tuesday, February 7, 12                                               40
INSERT A
        x,y
                             Prevention methods: Fail on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                               host3
                              master

                          M                               S
                                       INSERT A
                                          x,z
Tuesday, February 7, 12                                               40
INSERT A
        x,y
                             Prevention methods: Fail on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                               host3
                              master

                          M                               S
                                       INSERT A
                                          x,z
Tuesday, February 7, 12                                               40
Prevention methods: DROP on master
                          host1
                                                          host3



                          M       S
                                                     S



                          host2                           host4
                              master

                          S       M                   S

Tuesday, February 7, 12                                           41
INSERT B
        x,y
                          Prevention methods: DROP on master
                          host1
                                                          host3



                          M       S
                                                     S



                          host2                           host4
                              master

                          S       M                   S

Tuesday, February 7, 12                                           41
INSERT B
        x,y
                          Prevention methods: DROP on master
                          host1
                                                          host3



                          M       S
                                                     S



                          host2                           host4
                              master

                          S       M                   S
                                       INSERT B
                                          x,z
Tuesday, February 7, 12                                           41
Prevention methods: DROP on master
                          host1
                                                          host3



                          M       S
                                                     S



                          host2                           host4
                              master

                          S       M                   S
                                       INSERT B
                                          x,z
Tuesday, February 7, 12                                           41
Prevention methods: DROP on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                            host3
                              master

                          M                            S

Tuesday, February 7, 12                                            42
INSERT A
        x,y
                           Prevention methods: DROP on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                            host3
                              master

                          M                            S
                                       INSERT A
                                          x,z
Tuesday, February 7, 12                                            42
Prevention methods: DROP on slave
                          host1
                                         (Multiple sources)



                          M




                          host2          INSERT B          host3
                                            x,y
                              master
                                          INSERT B
                          M                  x,z       S

Tuesday, February 7, 12                                            43
Prevention methods: DROP on slave
                          host1
                                         (Multiple sources)



                          M




                          host2                            host3
                              master
                                          INSERT B
                          M                  x,z       S

Tuesday, February 7, 12                                            43
Tungsten in practice
                              Installation




Tuesday, February 7, 12                          44
Installation

                     • Check the requirements
                     • Get the binaries
                     • Expand the tarball
                     • Run ./tools/tungsten-installer

Tuesday, February 7, 12                                 45
REQUIREMENTS

   • Java JRE or JDK (Sun/Oracle or Open-jdk)
   • Ruby 1.8 (only during installation)
   • ssh access to the same user in all nodes
   • MySQL user with all privileges

Tuesday, February 7, 12                         46
Installation types


                     • master / slave
                     • slave - direct


Tuesday, February 7, 12                        47
master/slave
                                                    host2
                      host1

                          master                        slave


                                                  THL
              binlog                THL

                                                    host3

                                                        slave


                                                  THL


Tuesday, February 7, 12                                         48
slave direct
                                                 host2
                      host1
                                                           slave
                          master
                                         relay log

                                                     THL
           binlog
                                                 host3

                                                           slave

                                         relay log

                                                     THL


Tuesday, February 7, 12                                            49
sample installation
                     • 4 servers
                          •   qa.r1.continuent.com r1

                          •   qa.r2.continuent.com r2

                          •   qa.r3.continuent.com r3

                          •   qa.r4.continuent.com r4

                     • MySQL 5.1
                     • tungsten-replicator-2.0.4
Tuesday, February 7, 12                                 50
Installation (1)
      # starting at node 4, but any would do

      for N in 1 2 3 4
      do
           ssh r$N mkdir tinstall
      done

      cd tinstall
      tar -xzf /path/to/tungsten-replicator-2.0.4.tar.gz
      cd tungsten-replicator-2.0.4




Tuesday, February 7, 12                                    51
Installation (2)
                export TUNGSTEN_BASE=$HOME/tinstall

         1 ./tools/tungsten-installer 
         2     --master-slave 
         3     --master-host=r1 
         4     --datasource-user=tungsten 
         5     --datasource-password=secret 
         6     --service-name=dragon 
         7     --home-directory=$TUNGSTEN_BASE 
         8     --cluster-hosts=r1,r2,r3,r4 
         9     --start




Tuesday, February 7, 12                               52
Installation (2)
  export TUNGSTEN_BASE=$HOME/tinstall

  ./tools/tungsten-installer 
     --master-slave  # installation mode
     --master-host=r1  # who’s the master
     --datasource-user=tungsten  # mysql username
     --datasource-password=secret  # mysql password
     --service-name=dragon    # name of the service
     --home-directory=$TUNGSTEN_BASE  # where we install
     --cluster-hosts=r1,r2,r3,r4  # hosts in cluster
     --start # start replicator after installing




Tuesday, February 7, 12                                 53
What does the
                            installation do
                 1: Validate all servers

               host4              host1           host2       host3

         ✔                    ✔               ✔           ✔
         ✗                    ✗               ✗           ✗
         ✔                    ✔               ✔           ✔
         ✔                    ✔               ✔           ✔

                          Report all errors
Tuesday, February 7, 12                                               54
What does the
                          installation do
                   1 (again): Validate all servers

               host4             host1        host2   host3

         ✔                   ✔            ✔           ✔
         ✔                   ✔            ✔           ✔
         ✔                   ✔            ✔           ✔
         ✔                   ✔            ✔           ✔



Tuesday, February 7, 12                                       55
What does the
                          installation do
               2: install Tungsten in all servers
                                              host4
                             $HOME/             host1
                               tinstall/         host2
                                config/             host3
                                releases/
                                relay/
                                logs/
                                tungsten/




Tuesday, February 7, 12                                     56
example
      ssh r2 chmod 444 $HOME/tinstall
      ./tools/tungsten-installer 
          --master-slave --master-host=r1 
          --datasource-user=tungsten 
          --datasource-password=secret 
          --service-name=dragon 
          --home-directory=$HOME/tinstall 
          --thl-directory=$HOME/tinstall/logs 
          --relay-directory=$HOME/tinstall/relay 
          --cluster-hosts=r1,r2,r3,r4 --start

      ERROR >> qa.r2.continuent.com >> /home/tungsten/
      tinstall is not writeable


Tuesday, February 7, 12                                  57
example
      ssh r2 chmod 755 $HOME/tinstall
      ./tools/tungsten-installer 
          --master-slave --master-host=r1 
          --datasource-user=tungsten 
          --datasource-password=secret 
          --service-name=dragon 
          --home-directory=$HOME/tinstall 
          --thl-directory=$HOME/tinstall/logs 
          --relay-directory=$HOME/tinstall/relay 
          --cluster-hosts=r1,r2,r3,r4 --start

      # no errors



Tuesday, February 7, 12                              58
Installation - direct
      ./tools/tungsten-installer 
          --direct 
          --master-host=r1 
          --slave-host=r4 
          --master-user=tungsten 
          --slave-user=tungsten 
          --master-password=secret 
          --slave-password=secret 
          --service-name=Castor 
          --channels=1 
          --home-directory=$TUNGSTEN_BASE 
          --start-and-report



Tuesday, February 7, 12                           59
http://bit.ly/tr20_cookbook




Tuesday, February 7, 12                60
Tungsten Replicator vs. Enterprise

  Feature                             Replicator   Enterprise
  Simple admin with trepctl               X            X
  MySQL Row/Statement 5.0/5.1/5.5         X            X
  Multi-master replication                X            X
  Parallel apply (2.0)                    X            X
  Distributed management with cctrl                    X
  Automated failover and recovery                      X
  Zero-downtime upgrade                                X
  SQL routing and load-balancing                       X
  Floating IP support                                  X

     © Continuent 2011


Tuesday, February 7, 12                                         61
Conclusion and Q&A




Tuesday, February 7, 12                        62
560 S. Winchester Blvd., Suite 500          Check out our blogs!
   San Jose, CA 95128                          http://scale-out-blog.blogspot.com
   Tel (866) 998-3642                          http://datacharmer.blogspot.com
   Fax (408) 668-1009                          http://flyingclusters.blogspot.com
   e-mail: sales@continuent.com

                                Continuent Web Site:
                             http://www.continuent.com

                               Tungsten Replicator 2.0:
                     http://code.google.com/p/tungsten-replicator

   ©Continuent 2012.                      63


Tuesday, February 7, 12                                                             63

Mais conteúdo relacionado

Semelhante a Building simple and complex replication clusters with Tungsten Replicator

Advanced mysql replication for the masses
Advanced mysql replication for the massesAdvanced mysql replication for the masses
Advanced mysql replication for the massesGiuseppe Maxia
 
[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술GAMENEXT Works
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.Takatoshi Matsuo
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandboxGiuseppe Maxia
 
Oracle+golden+gate+introduction
Oracle+golden+gate+introductionOracle+golden+gate+introduction
Oracle+golden+gate+introductionxiakaicd
 

Semelhante a Building simple and complex replication clusters with Tungsten Replicator (6)

Advanced mysql replication for the masses
Advanced mysql replication for the massesAdvanced mysql replication for the masses
Advanced mysql replication for the masses
 
[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술[NHN] 성공적인 소셜게임 런칭과 기술
[NHN] 성공적인 소셜게임 런칭과 기술
 
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandbox
 
NoSQL
NoSQLNoSQL
NoSQL
 
Oracle+golden+gate+introduction
Oracle+golden+gate+introductionOracle+golden+gate+introduction
Oracle+golden+gate+introduction
 

Mais de Giuseppe Maxia

MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerGiuseppe Maxia
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installerGiuseppe Maxia
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerGiuseppe Maxia
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesGiuseppe Maxia
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBGiuseppe Maxia
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorGiuseppe Maxia
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorialGiuseppe Maxia
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenGiuseppe Maxia
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usabilityGiuseppe Maxia
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenGiuseppe Maxia
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringGiuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandboxGiuseppe Maxia
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationGiuseppe Maxia
 

Mais de Giuseppe Maxia (20)

MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 roles
 
MySQL document_store
MySQL document_storeMySQL document_store
MySQL document_store
 
Replication skeptic
Replication skepticReplication skeptic
Replication skeptic
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDB
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten Replicator
 
MySQL in your laptop
MySQL in your laptopMySQL in your laptop
MySQL in your laptop
 
Script it
Script itScript it
Script it
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorial
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usability
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with Tungsten
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clustering
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Building simple and complex replication clusters with Tungsten Replicator

  • 1. Building simple and complex replication clusters with Tungsten Giuseppe Maxia Replicator QA Director Continuent, Inc @datacharmer ©Continuent 2012. 1 This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. Tuesday, February 7, 12 1
  • 2. From the user's standpoint Tuesday, February 7, 12 2
  • 3. transaction transaction MySQL transaction transaction transaction DBMS transaction transaction transaction transaction transaction transaction transaction BINARY LOG ns act act tio n tra ansio ns sac ntio ac ion ion n ac nr tr tra aniton tsa a n csio nts ct n rn a o taa scti r trnsa n n MySQL replication tio ct tra tra REPLICATION transaction transaction is single threaded MySQL DBMS Tuesday, February 7, 12 3
  • 4. master master master master MySQL MySQL MySQL MySQL DBMS DBMS DBMS DBMS MySQL MySQL MySQL MySQL DBMS DBMS DBMS DBMS slave slave slave slave single source multi source (fan-in) multiple sources? Tuesday, February 7, 12 4
  • 5. from this to this MySQL MySQL DBMS DBMS master master MySQL MySQL DBMS DBMS master master multiple masters? Tuesday, February 7, 12 5
  • 6. INSERT INSERT RECORD RECORD A A MySQL MySQL DBMS DBMS master master MySQL MySQL DBMS DBMS MODIFY master master MODIFY RECORD RECORD B B Avoiding conflicts? Tuesday, February 7, 12 6
  • 7. master Seamless failover? MySQL DBMS master MySQL DBMS master MySQL DBMS MySQL MySQL DBMS DBMS slave slave MySQL DBMS MySQL DBMS slave slave MySQL MySQL DBMS DBMS slave slave Tuesday, February 7, 12 7
  • 8. Replicating to something else? mysql master MySQL DBMS MySQL DBMS mysql postgresql oracle mongodb Tuesday, February 7, 12 8
  • 9. All these examples tell us: Nice dream, but MySQL can’t do it Tuesday, February 7, 12 9
  • 11. http://code.google.com/p/tungsten-replicator Open Source 100% GPL v2 Tuesday, February 7, 12 11
  • 12. What can it do? • Easy failover • Multiple masters • Multiple sources to a single slave • Conflict prevention • Parallel replication • Replicate to Oracle and PostgreSQL database Tuesday, February 7, 12 12
  • 13. master-slave Heterogeneous Direct slave Regular MySQL MySQL Oracle Master Oracle MySQL fan-in slave all-masters star-schema ©Continuent 2012. Tuesday, February 7, 12 13
  • 14. Main components • Transaction History Logs (THL) • roughly corresponding to MySQL relay logs • have a lot of metadata • Service database • contains metadata for latest transactions • Metadata is committed together with data • Makes slaves crash proof Tuesday, February 7, 12 14
  • 16. Parallel replication facts ✓Sharded by database ✓Good choice for slave lag problems ❖Bad choice for single database projects Tuesday, February 7, 12 16
  • 17. Parallel Replication test STOPPED binary logs MySQL slave Concurrent sysbench on 30 databases running for 1 hour OFFLINE TOTAL DATA: 130 GB Tungsten slave direct: alpha RAM per server: 20GB (slave) replicator alpha Slaves will have 1 hour lag Tuesday, February 7, 12 17
  • 18. measuring results START binary logs MySQL slave ONLINE Recording catch-up time Tungsten slave direct: alpha (slave) replicator alpha Tuesday, February 7, 12 18
  • 19. MySQL native replication slave catch up in 04:29:30 Tuesday, February 7, 12 19
  • 20. Tungsten parallel replication slave catch up in 00:55:40 Tuesday, February 7, 12 20
  • 21. Parallel replication made simpler FROM HERE .... Tuesday, February 7, 12 21
  • 22. Parallel replication made simpler TO HERE Tuesday, February 7, 12 22
  • 23. Parallel replication made simpler Tuesday, February 7, 12 23
  • 24. parallel replication direct slave facts Tuesday, February 7, 12 24
  • 25. parallel replication direct slave facts ✓No need to install Tungsten on the master Tuesday, February 7, 12 24
  • 26. parallel replication direct slave facts ✓No need to install Tungsten on the master ✓Tungsten runs only on the slave Tuesday, February 7, 12 24
  • 27. parallel replication direct slave facts ✓No need to install Tungsten on the master ✓Tungsten runs only on the slave ✓Replication can revert to native slave with two commands (trepctl offline; start slave) Tuesday, February 7, 12 24
  • 28. parallel replication direct slave facts ✓No need to install Tungsten on the master ✓Tungsten runs only on the slave ✓Replication can revert to native slave with two commands (trepctl offline; start slave) ✓Native replication can continue on other slaves Tuesday, February 7, 12 24
  • 29. parallel replication direct slave facts ✓No need to install Tungsten on the master ✓Tungsten runs only on the slave ✓Replication can revert to native slave with two commands (trepctl offline; start slave) ✓Native replication can continue on other slaves ❖Failover (either native or Tungsten) becomes a manual task Tuesday, February 7, 12 24
  • 31. multiple masters • Tungsten Replicator recipe: use more services Tuesday, February 7, 12 26
  • 33. Bi-directional replication with slaves Tuesday, February 7, 12 28
  • 35. multiple sources • Tungsten Replicator recipe is still valid: use more services Tuesday, February 7, 12 30
  • 37. Multiple masters replication: 3 nodes Tuesday, February 7, 12 32
  • 38. Multiple masters replication: 4 nodes Tuesday, February 7, 12 33
  • 41. Conflict prevention facts Tuesday, February 7, 12 36
  • 42. Conflict prevention facts • Sharded by database Tuesday, February 7, 12 36
  • 43. Conflict prevention facts • Sharded by database • Defined dynamically Tuesday, February 7, 12 36
  • 44. Conflict prevention facts • Sharded by database • Defined dynamically • Applied either at the master or at the slave Tuesday, February 7, 12 36
  • 45. Conflict prevention facts • Sharded by database • Defined dynamically • Applied either at the master or at the slave • methods: Tuesday, February 7, 12 36
  • 46. Conflict prevention facts • Sharded by database • Defined dynamically • Applied either at the master or at the slave • methods: • make replication fail Tuesday, February 7, 12 36
  • 47. Conflict prevention facts • Sharded by database • Defined dynamically • Applied either at the master or at the slave • methods: • make replication fail • drop silently Tuesday, February 7, 12 36
  • 48. Conflict prevention facts • Sharded by database • Defined dynamically • Applied either at the master or at the slave • methods: • make replication fail • drop silently • drop with warning Tuesday, February 7, 12 36
  • 49. Tungsten Conflict prevention points host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 37
  • 50. Tungsten Conflict prevention points host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 37
  • 51. Tungsten Conflict prevention points host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 37
  • 52. Prevention methods: Fail on master host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 38
  • 53. INSERT A x,y Prevention methods: Fail on master host1 host3 M S S host2 host4 master S M S INSERT A x,z Tuesday, February 7, 12 38
  • 54. INSERT A x,y Prevention methods: Fail on master host1 host3 M S S host2 host4 master S M S INSERT A x,z Tuesday, February 7, 12 38
  • 55. Prevention methods: Fail on slave host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 39
  • 56. INSERT A x,y Prevention methods: Fail on slave host1 host3 M S S host2 host4 master S M S INSERT A x,z Tuesday, February 7, 12 39
  • 57. INSERT A x,y Prevention methods: Fail on slave host1 host3 M S S host2 host4 master S M S INSERT A x,z Tuesday, February 7, 12 39
  • 58. Prevention methods: Fail on slave host1 (Multiple sources) M host2 host3 master M S Tuesday, February 7, 12 40
  • 59. INSERT A x,y Prevention methods: Fail on slave host1 (Multiple sources) M host2 host3 master M S INSERT A x,z Tuesday, February 7, 12 40
  • 60. INSERT A x,y Prevention methods: Fail on slave host1 (Multiple sources) M host2 host3 master M S INSERT A x,z Tuesday, February 7, 12 40
  • 61. Prevention methods: DROP on master host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 41
  • 62. INSERT B x,y Prevention methods: DROP on master host1 host3 M S S host2 host4 master S M S Tuesday, February 7, 12 41
  • 63. INSERT B x,y Prevention methods: DROP on master host1 host3 M S S host2 host4 master S M S INSERT B x,z Tuesday, February 7, 12 41
  • 64. Prevention methods: DROP on master host1 host3 M S S host2 host4 master S M S INSERT B x,z Tuesday, February 7, 12 41
  • 65. Prevention methods: DROP on slave host1 (Multiple sources) M host2 host3 master M S Tuesday, February 7, 12 42
  • 66. INSERT A x,y Prevention methods: DROP on slave host1 (Multiple sources) M host2 host3 master M S INSERT A x,z Tuesday, February 7, 12 42
  • 67. Prevention methods: DROP on slave host1 (Multiple sources) M host2 INSERT B host3 x,y master INSERT B M x,z S Tuesday, February 7, 12 43
  • 68. Prevention methods: DROP on slave host1 (Multiple sources) M host2 host3 master INSERT B M x,z S Tuesday, February 7, 12 43
  • 69. Tungsten in practice Installation Tuesday, February 7, 12 44
  • 70. Installation • Check the requirements • Get the binaries • Expand the tarball • Run ./tools/tungsten-installer Tuesday, February 7, 12 45
  • 71. REQUIREMENTS • Java JRE or JDK (Sun/Oracle or Open-jdk) • Ruby 1.8 (only during installation) • ssh access to the same user in all nodes • MySQL user with all privileges Tuesday, February 7, 12 46
  • 72. Installation types • master / slave • slave - direct Tuesday, February 7, 12 47
  • 73. master/slave host2 host1 master slave THL binlog THL host3 slave THL Tuesday, February 7, 12 48
  • 74. slave direct host2 host1 slave master relay log THL binlog host3 slave relay log THL Tuesday, February 7, 12 49
  • 75. sample installation • 4 servers • qa.r1.continuent.com r1 • qa.r2.continuent.com r2 • qa.r3.continuent.com r3 • qa.r4.continuent.com r4 • MySQL 5.1 • tungsten-replicator-2.0.4 Tuesday, February 7, 12 50
  • 76. Installation (1) # starting at node 4, but any would do for N in 1 2 3 4 do ssh r$N mkdir tinstall done cd tinstall tar -xzf /path/to/tungsten-replicator-2.0.4.tar.gz cd tungsten-replicator-2.0.4 Tuesday, February 7, 12 51
  • 77. Installation (2) export TUNGSTEN_BASE=$HOME/tinstall 1 ./tools/tungsten-installer 2 --master-slave 3 --master-host=r1 4 --datasource-user=tungsten 5 --datasource-password=secret 6 --service-name=dragon 7 --home-directory=$TUNGSTEN_BASE 8 --cluster-hosts=r1,r2,r3,r4 9 --start Tuesday, February 7, 12 52
  • 78. Installation (2) export TUNGSTEN_BASE=$HOME/tinstall ./tools/tungsten-installer --master-slave # installation mode --master-host=r1 # who’s the master --datasource-user=tungsten # mysql username --datasource-password=secret # mysql password --service-name=dragon # name of the service --home-directory=$TUNGSTEN_BASE # where we install --cluster-hosts=r1,r2,r3,r4 # hosts in cluster --start # start replicator after installing Tuesday, February 7, 12 53
  • 79. What does the installation do 1: Validate all servers host4 host1 host2 host3 ✔ ✔ ✔ ✔ ✗ ✗ ✗ ✗ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Report all errors Tuesday, February 7, 12 54
  • 80. What does the installation do 1 (again): Validate all servers host4 host1 host2 host3 ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Tuesday, February 7, 12 55
  • 81. What does the installation do 2: install Tungsten in all servers host4 $HOME/ host1 tinstall/ host2 config/ host3 releases/ relay/ logs/ tungsten/ Tuesday, February 7, 12 56
  • 82. example ssh r2 chmod 444 $HOME/tinstall ./tools/tungsten-installer --master-slave --master-host=r1 --datasource-user=tungsten --datasource-password=secret --service-name=dragon --home-directory=$HOME/tinstall --thl-directory=$HOME/tinstall/logs --relay-directory=$HOME/tinstall/relay --cluster-hosts=r1,r2,r3,r4 --start ERROR >> qa.r2.continuent.com >> /home/tungsten/ tinstall is not writeable Tuesday, February 7, 12 57
  • 83. example ssh r2 chmod 755 $HOME/tinstall ./tools/tungsten-installer --master-slave --master-host=r1 --datasource-user=tungsten --datasource-password=secret --service-name=dragon --home-directory=$HOME/tinstall --thl-directory=$HOME/tinstall/logs --relay-directory=$HOME/tinstall/relay --cluster-hosts=r1,r2,r3,r4 --start # no errors Tuesday, February 7, 12 58
  • 84. Installation - direct ./tools/tungsten-installer --direct --master-host=r1 --slave-host=r4 --master-user=tungsten --slave-user=tungsten --master-password=secret --slave-password=secret --service-name=Castor --channels=1 --home-directory=$TUNGSTEN_BASE --start-and-report Tuesday, February 7, 12 59
  • 86. Tungsten Replicator vs. Enterprise Feature Replicator Enterprise Simple admin with trepctl X X MySQL Row/Statement 5.0/5.1/5.5 X X Multi-master replication X X Parallel apply (2.0) X X Distributed management with cctrl X Automated failover and recovery X Zero-downtime upgrade X SQL routing and load-balancing X Floating IP support X © Continuent 2011 Tuesday, February 7, 12 61
  • 87. Conclusion and Q&A Tuesday, February 7, 12 62
  • 88. 560 S. Winchester Blvd., Suite 500 Check out our blogs! San Jose, CA 95128 http://scale-out-blog.blogspot.com Tel (866) 998-3642 http://datacharmer.blogspot.com Fax (408) 668-1009 http://flyingclusters.blogspot.com e-mail: sales@continuent.com Continuent Web Site: http://www.continuent.com Tungsten Replicator 2.0: http://code.google.com/p/tungsten-replicator ©Continuent 2012. 63 Tuesday, February 7, 12 63