6.3.5. Understanding Replicator Roles

Replicators can have one of four roles, Extractor(master),Applier(slave), thl-server or thl-client.

  • 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.

  • 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