|
  |
  |
  |
    |
|
  |
|
              Empress Technical News -  October 2010     Empress Continuous Mode Replication   Introduction Database replication is the act of copying data between different databases. In addition to copying, database replication encompasses analysis, administration and monitoring for data consistency across multiple databases. Using replication, databases become distributed and users can take advantage of that to increase the availability and performance of their distributed databases. The benefits of using database replication are many:   1.     Higher data availability: 2.     Reduce network traffic with a local database 3.     Distribute system load to multiple locations: 6.     Distribute partial data as
needed   Empress Replication A Master Table is a database table that serves as a source of data, which may be updated. A Table is a read-only database table that gets a copy of data that is in a Master Table. All data updates are made to a Master Table and are later propagated to Replicate Tables. In Figure 1, data from Host A is replicated to Hosts B, C and D and synchronized. The origin of data is called Replication Master Table (RMT) and the copy is called Replication Replicate Table (RRT).
Figure 1: Empress Replication Architecture   A table can be a Master or a Replicate Table, and it can act as a Replication Master Table (RMT) or as a Replication Replicate Table (RRT). For example, the Replicate Table in the host C in 1 acts as the RRT during the request from Host C, but acts as the RMT for the request from Host D. Replication Synchronization updates an RRT with changed data from its RMT. The Synchronization requests are made by an Empress Synchronization Client (emprepsync). The Replication Master Server listens to synchronization requests from its clients and provides data from an RMT. In Figure 1 two Replication Master Servers propagate data to all the Hosts: the Server in Host A and the Server in Host C. A synchronization request can be made manually, or can be automated. The RRT side does not have to be always connected to a Replication Master Server, but only for duration of synchronization. Empress replication is an asynchronous replication. Hence, there will always be some lag between RMT and its RRT as defined by a   frequency of synchronization. All Replicate Tables have the same structure as the Master Table. Subset Replication is a special feature of Empress Replication. A replicate table is normally created as a replica of an entire RMT, but it may also be created as a subset of an RMT by specifying a conditional expression using an SQL WHERE Clause. This way Empress supports replication of partial database data as horizontal partitioning of the original database.   Empress Standard
Mode Replication Every time the synchronization process is invoked by the utility emprepsync in 2, it takes time to spawn the process, initialize Empress database internal structures, connect to the proper Replication Master Server, open communication, etc. All those operations are necessary for synchronization to take place but create an overhead when the synchronization process has to be repeated many times as described in Figure 2.                                                 Figure 2: Empress Standard Mode Replication   Empress Continuous Mode Replication When the connection with Replication Master Server is successfully established, emprepsyncd will keep the connection open and continue to use the same connection to  synchronize data. Figure 3 below shows Empress Replication in continuous mode using .                                       Figure 3: Empress Continuous Mode Replication   Examples of
Empress Replication   Non-Continuous Mode Replication where
option is:   Continuous Mode
Replication where: RDB                        Replicate database name     In order to continuously replicate data in the database repairs from a master table personnel every 0.3 seconds, one would invoke the Empress utility in the following way: emprepsyncd repairs personnel 0.3     Instead of Summary Empress Software brings high performance Empress Continuous Mode Replication Client to satisfy user needs where the speed of data synchronization between master data and replicas is of the utmost importance.   Empress Software Inc. |