How to Prepare for Active Data Replication
How to Prepare for Active Data Replication
Planning to implement active data replication? Read on to learn more about how this works, the potential obstacles you could encounter during the process, and how to properly prepare for replication.
What Is Active/Active Replication?
Your workplace operations may use multiple databases. Replicating data across them can save you significant time and effort. Active/active replication refers to the process of synchronizing changes between these databases. This is achieved by using the same application tables between them, although they continue to operate on an independent basis. How many databases might an active/active replication setup involve? It could just be two, but it could equally be many more. This process is often used for geographical replication or migrations. For example, active/active replication could be used while migrating on-premises data to the cloud. If you wish to implement active/active replication by running change data capture you could encounter data collisions (for example, duplicate primary keys) that make this complicated. A little planning and preparation can prevent this from happening and allow you to integrate all databases. One of the advantages of active/active replication is that, should a disaster occur that removes a database copy, another can automatically replace it.Key Considerations for Active Data Replication:
Primary Keys
If your application generates a primary key from a database sequence, be prepared to implement adoption. Otherwise, an active/active relationship will likely result in data issues. You can prevent data collisions by taking the following three steps:- On different sides, you should start the sequence at incremental values. Bear in mind that the sequence should be incremented by the number of active sites.
- Introduce a unique composite key by adding a column to every table.
- Review each site periodically and ensure they haven’t used their allocated batch of numbers.