Host-Aware Replication

Use host-aware replication to ensure that the data for seeders running on the same machine is always replicated by seeders running on a different machine.

If there is only one seeder running on a machine, then host-aware replication is not needed, because data could not be replicated onto the same machine if there are no other seeders running on that machine.

To set up host-aware replication for the seeders on a machine, you logically group the seeders together using the following member naming convention:

<group_name>.<member_name>

where group_name can be any name which helps you to identify the grouping of seeder members. For example, the group_name can be the name of the machine on which the seeders are running or some other arbitrary name that logically identifies the group of seeders.

Note: Host-aware replication is purely based on the group_name part of the member name of the seeder, and not on the IP address of the physical host the process is running on.

Figure 4, Sample Deployment with Host-Aware Replication shows a topology for host-aware replication in which each host is running four seeders and a seeder grouping is defined for each host.

Sample Deployment with Host-Aware Replication
Note: Remember that when replicate all is set, the host aware settings are ignored and all seeders of the spaces get either the original copy or the replica.
The first host is named Host1, and runs four seeders, Seeder1, Seeder2, Seeder3, and Seeder4. The second host is named Host2, and the third host is named Host3. Each of these hosts also runs four seeders.

If you name the seeders according to host-aware replication member naming, then ActiveSpaces always replicates data that is seeded on one of the seeders on a given host to a seeder that is running on another host. Therefore, if a host or device goes down, the data that was seeded by any of the seeders on that host is not lost, because it is automatically backed up on a seeder that resides on another host.

You can set up this type of topology in several ways:

  • By using the TIBCO ActiveSpaces API programs in an application program that implements <group_name>.<member_name> member names.

    For information on the API functions to implement host-aware replication, see TIBCO ActiveSpaces Developer’s Guide.

  • By using as-agent and specifying the member names using the -member_name parameter.
    Note: The parameter, -name is deprecated.

    For example, you might use as-agent with the -member_name parameter to start four seeders on each host. For example, on host 1, run as-agent as follows:

    java -jar as-agent.jar -metaspace ms -discovery 
    tcp://127.0.0.1:50000  -listen tcp://127.0.0.1:50000 
    -member_name Host.1.Seeder1

    Then run two additional instances, with the -member_name parameter specifying Host1.Seeder2, and Host1.Seeder3.

  • When using as-admin to connect to a metaspace, the member name is specified using the member_name option of the connect command.