6.3.5. Understanding Replicator Roles

Replicators can have one of the following roles, master, slave, thl-server, thl-client or thl-applier.

Replicators within Composite Active/Passive Composite Active/Active and Composite Dynamic Active/Active clusters can also have the relay role.

  • master

    A replicator in a master role extracts data from a source database (for example, by reading the binary log from a MySQL server), and generates THL. As a master the replicator also provides the THL to other replicators over the network connection.

  • slave

    A slave replicator pulls THL data from a master and then applies that data to a target database.

  • relay

    A relay replicator is associated with the relay node within Composite Active/Passive, Composite Active/Active and Composite Dynamic Active/Active clusters only.

    It receives and applies locally, THL from the remote active cluster and is then made available for downstream replica nodes within the same custer.

  • thl-server

    A thl-server replicator is a special role that Extractor replicators can be changed to temporarily when a Primary is taken offline. This will allow downstream Applier replicators to download and apply any THL that hasn't yet been processed by the Applier.

    To enable this role, first you must place the cluster into MAINTENANCE mode and then issue the following statements

    shell> trepctl offline
    shell> trepctl setrole -role thl-server
    shell> trepctl online

    To revert back to the original Extractor role, issue the following

    shell> trepctl offline
    shell> trepctl setrole -role master
    shell> trepctl online

  • thl-client

    A thl-client replicator is a special role that Applier replicators can be changed to. This will allow the Applier replicator to download any THL available from the upstream Extractor, but does NOT apply the THL to the target database.

    To enable this role, first you must place the cluster into MAINTENANCE mode and then issue the following statements

    shell> trepctl offline
    shell> trepctl setrole -role thl-client
    shell> trepctl online

    To revert back to the original Applier role, issue the following

    shell> trepctl offline
    shell> trepctl setrole -role slave
    shell> trepctl online

  • thl-applier

    A thl-applier replicator is a special role that applier replicators can be changed to temporarily when a Primary is taken offline. This will allow downstream applier replicators to apply any locally available THL that hasn't yet been processed by the applier.

    To enable this role, first you must place the cluster into MAINTENANCE mode and then issue the following statements

    shell> trepctl offline
    shell> trepctl setrole -role thl-applier
    shell> trepctl online

    To revert back to the original role, issue the following

    shell> trepctl offline
    shell> trepctl setrole -role slave
    shell> trepctl online