3.2. Deploying Composite Multimaster Clustering

A Composite Multimaster Cluster topology provides all the benefits of a typical dataservice at a single location, but with the benefit of also replicating the information to another site. The underlying configuration within Tungsten Clustering uses two services within each node; one provides the replication within the cluster, and the second provides replication from the remote cluster. Both are managed by the Tungsten Manager


Multimaster Clusters were previously referred to as multisite/multimaster clusters. The name has been updated to reflect the nature of these clusters as part of an overall multimaster deployment using clusters, where the individual clusters could be in the same or different locations.

The configuration is handled with a single configuration and deployment that configures the core cluster services and additional cross-cluster services.

A sample display of how this operates is provided in Figure 3.2, “Topologies: Composite Multimaster Clusters”.

Figure 3.2. Topologies: Composite Multimaster Clusters

Topologies: Composite Multimaster Clusters

The service can be described as follows:

  • Tungsten Clustering Service: east

    Replicates data between east1, east2 and east3 (not shown).

  • Tungsten Clustering Service: west

    Replicates data between west1, west2 and west3 (not shown).

  • Tungsten Clustering Service: west_from_east

    Defines the replication of data within east as a replicator service using a secondary service within the cluster deployed Tungsten Replicator. This service reads from all the hosts within the Tungsten Clustering service east and writes to west1, west2, and west3.

  • Tungsten Replicator Service: east_from_west

    Defines the replication of data within west as a replicator service using a secondary service within the cluster deployed Tungsten Replicator. This service reads from all the hosts within the Tungsten Clustering service west and writes to east1, east2, and east3.

3.2.1. Prepare: Composite Multimaster Clusters

Some considerations must be taken into account for any multimaster scenario:

  • For tables that use auto-increment, collisions are possible if two hosts select the same auto-increment number. You can reduce the effects by configuring each MySQL host with a different auto-increment settings, changing the offset and the increment values. For example, adding the following lines to your my.cnf file:

    auto-increment-offset = 1
    auto-increment-increment = 4

    In this way, the increments can be staggered on each machine and collisions are unlikely to occur.

  • Use row-based replication. Update your configuration file to explicitly use row-based replication by adding the following to your my.cnf file:

    binlog-format = row
  • Beware of triggers. Triggers can cause problems during replication because if they are applied on the slave as well as the master you can get data corruption and invalid data. Tungsten Clustering cannot prevent triggers from executing on a slave, and in a multimaster topology there is no sensible way to disable triggers. Instead, check at the trigger level whether you are executing on a master or slave. For more information, see Section C.3.1, “Triggers”.

3.2.2. Install: Composite Multimaster Clusters

Deployment of composite multimaster clusters is currently only supported using the INI method of deployment.

Configuration and deployment of the cluster works as follows:

  • Creates two basic master/slave clusters.

  • Creates a composite service that includes the master/slave clusters within the definition.

The resulting configuration within the example builds the following deployment:

  • One cluster, east, with three hosts.

  • One cluster, west, with three hosts.

  • All six hosts in the two clusters will have a manager, replicator and connector installed.

  • Each replicator has two replication services, one service that replicates the data within the cluster. The second service, replicates data from the other cluster to this host.

For more information, see Section, “Install: Composite Multimaster Clusters using INI Configuration”.