Distribution by Connection

In a Multi-Path Replication environment, you can distribute the replication load from multiple client connections to a primary database across the available primary replication paths originating from the database.

Each client connection to the primary database and each server process has a unique system process ID (spid). The Adaptive Server RepAgent uses the value of the spid stored in the database transaction log to identify transactions done by a specific client connection or server process. A spid for a client changes if the client disconnects and reconnects.

In distribution by connection, the Adaptive Server RepAgent assigns transactions originated by different client processes to the available replication paths. Over time, the distribution of data tends to be balanced across all available paths. Replication performance improves and replication load distribution is more uniform if there are more RepAgent paths available and the number of client processes is large.

When you configure distribution by connection, RepAgent distributes transactions through a replication path according to the spid and number of available replication paths. All transactions done by a specific spid always use the same replication path. Across time the number of spids assigned to each path becomes approximately the same because the distribution of spids tends to be uniform. Suppose there are three users and the spid of user 1 is 1, user2 is 2, and user3 is 5, and there are three replication paths: default, PDS.pdb1_conn1, and PDS.pdb1_conn2. In this example: Transactions generated by user1 cannot replicate through PDS.pdb1_conn1 or PDS.pdb1_conn2, and transactions generated by user2 cannot replicate through the default or PDS.pdb1_conn1 connections.

If there is a new path available, and you do not restart RepAgent to recognize the new path, RepAgent continues to distribute transactions to the existing paths. When you restart RepAgent, RepAgent reloads the confguration of all paths, and changes to the number and destination of paths take effect. Transactions may be sent through a different path or go to a different destination Replication Server. However, if the transactions uses a different path, duplicate transactions can occur. Sybase recommends that you do not change the destination Replication Servers of the replication paths from the primary data server, if RepAgent is using distribution by connection.

Once you enable distribution by connection, RepAgent does not use the bindings and the bindings do not have any effect. You can still see any object bindings that you defined when you use sp_replication_path to list them. You must restart RepAgent and quiesce Replication Server when you change the:

Database Support

Replication Server supports distribution by connection for multipath replication from Adaptive Server version 15.7 ESD #1 and later primary databases.