Selective Shadowing Master Slave configuration

Document ID : KB000093272
Last Modified Date : 22/05/2018
Show Technical Document Details
Introduction:
You may  have a requirement where you want to replicate all the attributes with one data center but replicate only selected number of attributes to other data center. 

Requirement Description: 
1. Data Center : DC1, DC2, DC3 
2. Each DC has at least 2 data DSA instances. 
3. DC1 & DC2 will be receiving write traffic from Application A. 
4. DC3 will be receiving only read traffic from Application B. However due to business requirement, you want to replicate only a set of attributes to DC3 from (DC1 or DC2). 

What your requirement is: 
1. If write request comes to DC1, replicate as is to DC2 instances but replicate only few selected attributes to DC3. 
2. If write request comes to DC2, replicate as is to DC1 instances but replicate only few selected attributes to DC3. 
3. You want this replication setup to have high availability & automatically deal with any fail over situation. 
Instructions:
Try this to match the above description.

DC name : DSAnames 
================== 
DC1     : mw1, mw2 (part of same MWG1 but no explicit MWGH)
DC2     : mw3, mw4 (part of same MWG2 but no explicit MWGH)
DC3     : mw5, mw6 (part of same MWG3 but no explicit MWGH)

As for the configuration goes:

All DSAs has 'set multi-write-disp-recovery = true;' defined in their respecive DXHOME/config/servers/dsaname.dxi file.

All DSAs shares each others KNOWLEDGE .dxc across the board.

For the KNOWLEDGE .dxc files...

mw1 throguh mw4 has: 
das-flags = multi-write 

mw5 and mw6 only has: 
dsa-flags = multi-write, shadow

Key here is, the exact same file is used on all 6 hosts.

Here is an example of AGREEMENT .dxc file.

======= 
set agreement 1.1 = 

   initiator        = mw1 supplier 
   responder   = mw5 anonymous 
   area            = <c au><o democorp> 
   filter            = {attr = objectClass value = inetOrgPerson} 
   attributes    = {{exclude = userPassword}} 
   strategy      = on-change 
}; 

set agreement 1.2 = 

   initiator        = mw1 supplier 
   responder   = mw6 anonymous 
   area            = <c au><o democorp> 
   filter            = {attr = objectClass value = inetOrgPerson} 
   attributes    = {{exclude = userPassword}} 
   strategy      = on-change 
}; 

set agreement 2.1 = 

   initiator        = mw3 supplier 
   responder   = mw5 anonymous 
   area            = <c au><o democorp> 
   filter            = {attr = objectClass value = inetOrgPerson} 
   attributes    = {{exclude = userPassword}} 
   strategy      = on-change 
}; 

set agreement 2.2 = 

   initiator        = mw3 supplier 
   responder   = mw6 anonymous 
   area            = <c au><o democorp> 
   filter            = {attr = objectClass value = inetOrgPerson} 
   attributes    = {{exclude = userPassword}} 
   strategy      = on-change 
}; 
=======

Now the testing part:

Create an entry on MW1 and you should notice replicated entirely on MW2/3/4 as well as to MW5/6 without userPassword. 

Create an entry on MW3 and I see it replicated entirely on MW1/2/4 as well as to MW5/6 without userPassword. 

Attemp to delete this entry either from MW5 or MW6, it fails to do so due to 'dsa-flags = multi-write, shadow'shadow' being defined.