Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Javier-Martin
Product and Topic Expert
Product and Topic Expert

     SAP’s RTDP (Real Time Data Platform) includes a portfolio of products that will make you company have extreme data management capabilities and SAP Sybase Replication Server as one of the products shipped in RTDP is being evolved constantly to accommodate new functionalities and improve performance. In today’s post I’d like to go through one of these new functionalities in SAP Sybase Replication Server version 15.7 called Multipath Replication (MPR from now on).

     Using MPR you can replicate data through different streams preserving both data consistency and transaction consistency within each of those streams called paths. It is important to note that objects with dependent transactions should not be bound to multiple paths, this is because commit order is not preserved across different paths. MPR has been implemented for two main targets:

  • Improve replication throughput and performance.
  • Reduce contention and latency.

Prerequisites for MPR

  • ASE 15.7 ESD 1 required.
  • SAP Sybase Replication Server 15.7 required.
  • SAP Sybase Replication Server ASO license required (Advanced Services Option).
  • Oracle is supported for MPR as primary DB in SAP Sybase Replication Server 15.7.1.

MPR Description

      In the following picture we can see a scenario with normal replication from a primary DB to a replicate DB describing a situation that can lead to high latency in Replicate DB:

    • t1 and t2 are totally independent tables
    • Client #1 runs a massive insert into table t1
    • Client #2 runs small insert into t2

     As the following picture shows, in a situation like the one described above we can solve the latency issue using MPR:

     In latest Rep Agent versions you have the availability to have several rep agent senders per database, and thus create several replication streams, splitting replication for objects across them binding those objects to concrete paths.

Example:

     Following scenario describes a SAP Sybase Replication Server system similar to the one in the picture above with next characteristics:

    • Normal connections:       

               -  Primary DB called s157.db1

               -  Replicate DB called s157.db2

    • Alternate connections (2nd path):

               -  Primary DB alternate connection s157.db1_path_2

               -  Replicate DB alternate connection s157.db2_path_2

     In this system “admin who” would show the following information:

Settings of MPR:

     Following script show the commands needed to replicate t1 (db1 -> db2) through default path:

1/ create replication definition t1

    with primary at s157.db1

    (              id int,

                    c char(10),

                    d datetime

    )

    primary key (id)

    go

               

2/ create subscription sub_t1 for t1

    with replicate at s157.db2

    without materialization

    go

     To set MPR to replicate t2 from db1 to db2 through 2dn path:

1/ Configure Rep  Agent for 2 senders at primary DB:

     sp_config_rep_agent db1, 'multithread rep agent', 'true'

     go

     sp_config_rep_agent db1, 'max number replication paths', '2'

     go

2/ Create alternate connections:

     create alternate connection to s157.db1

     named s157.db1_path_2

     with primary only

     go

     

     create alternate connection to s157.db2

     named s157.db2_path_2

     go

3/ Bind table t2 to 2n path:

     sp_replication_path db1, 'bind', 'table', t2, db1_path_2

     go

4/ Create replication definition and subscription

     create replication definition rd_t2_path_2

     with primary at s157.db1

     with all tables named t2

     (              id int,

                    c char(10),

                    d datetime

     )

     primary key (id)

     go

               

     create subscription sub_t2 for rd_t2_path_2

     with primary at s157.db1_path_2

     with replicate at s157.db2_path_2

     without materialization

     go

Notes

  • MPR can be used for heterogeneous Replication Systems with Oracle (oracle versions supported are 10g and 11g).
  • MPR is also supported with IQ 15.1 and later as replicate DB.
  • MPR can be used in warm-standby and MSA.
  • In Replication Server systems domains with several Replication Servers you can create both logical of physical paths.
  • Future features planned for MPR:
    • Several log readers per database.
    • Dedicate path by specific user login.
    • Rows from same transaction distributed across different paths using a column hash value (to allow replication of huge bcps in parallel at replicate DB).

More details in SAP Sybase documentation:

       

Other/Related Posts:

1 Comment