|
•
|
Replication Server. A replication server is a process running as a dedicated RESTful service on an HTTP server. The replication server uses a single Kafka broker and either one or two ZooKeeper instances. Each replication server can either have none, one, or more than one associated databases that act as a producer or consumer for Kafka. The replication server is the first EDB Replication Server component that must be created and started when you create a replication node.
|
|
•
|
Leader Service. Leader service is the primary replication server in the replication network. The leader service is the replication server with which the RepCLI commands issued by the users communicate. The first replication server started while creating a new replication network acts as the leader service and has two ZooKeeper instances running in its framework. All the other additional replication servers added to the replication network have a single ZooKeeper instance. During replication, the leader service role may be transferred to another replication server. This happens due to a failover operation ( the current replication server acting as the leader service aborts, so the leader service operation is transferred to an active replication server to keep the replication network active).
|
|
•
|
Replication Network. A Replication network is a group of one or more replication nodes. Each replication node must be registered on the replication network. This is done by joining its replication server to the replication network. The first replication server started and joined to the replication network starts as the leader service. All of the registered replication nodes can then exchange changed data between any of their producer and consumer databases. Also, there may be replication nodes with no databases that are provided for high availability.
|
|
•
|
Publication. Publication is a defined as a set of one or more tables from a given producer database whose changed data is streamed to consumer databases. A publication is implemented as Kafka topics for storing the changed data. The changed data is streamed to consumer databases that have been registered as part of the replication network and are joined to that particular publication. A publication is identified by a name that must be unique amongst all the publications in the replication network.
|
|
•
|
Replication Command Line Interface (RepCLI). RepCLI is the command line tool to do the setup, configuration, and execution process for EDB Replication Server. The RepCLI commands are supported by the RESTful architecture.
|
Note: Although only the database versions which are certified (in the development environment) are mentioned in the above table, the other versions are also supported (but not certified in the development environment).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: These source and target versions although supported are not tested and formally certified (in the development environment).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: These source and target versions although supported are not tested and formally certified (in the development environment).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: These source and target versions although supported are not tested and formally certified (in the development environment).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Xmx in the
ngxReplicationServer-7.config file located at
/usr/edb/rs-7.0/common/etc/sysconfig as shown below. These changes apply while EDB Replication Server is starting.
Perform the following steps as the root user for installing EDB Advanced Server. In this scenario, we are installing Advanced Server 10. Make sure to replace the correct EDB Advanced Server version if installing any other.
Step 1: Visit the following URL to obtain the credentials to access EDB Yum Repository:
Step 2: Download the EDB repository RPM.
Step 3: Replace the username and password which you got from Step 1 in place of
<yum user> and
<yum password> in
edb.repo located at:
Step 4: Enable the components to be installed.
Step 6: Create Advanced Server cluster 1 with default port 5444.
Step 7: Create Advanced Server cluster 2 with non-default port 5445.
Step 8: Modify the Advanced Server configuration file to allow the usage for EDB Replication Server.
Step 10: Check the status of the EDB Advanced Server service.
Step 11 (Optional): If the status of the Advanced Server Service is
inactive (dead), then run the following from the
/usr/edb/asx/bin directory:
where x is the Advanced Server version.
Step 2: Install the EDB Replication Server packages. If you are not installing directly from the EDB Yum Repository by enabling the EDB Replication Server component noted in Step 4, but you have directly downloaded the package files to your host machine, change to the directory to where the package files have been downloaded before invoking the following
install command.
Step 3: Set the password for the database user
enterprisedb on each cluster.
Step 4: Create the databases for replication node in each cluster.
Step 5: Create the table in database
node1 and insert the initial rows.
Step 6: Create the table in database
node2 with no rows.
Step 7: Set the environment variables
HOST_IP and
EPRS_HOME, and then start the EDB Replication Server.
Step 8: Open a second terminal, and as the
root user, set the
HOST_IP and
EPRS_HOME environment variables, then run the
joinnetwork RepCLI command.
Step 9: Set the administrator password.
Step 10: Encrypt the password which is used in some RepCLI commands. The displayed encrypted password has been included in subsequent
adddb RepCLI commands.
Step 11: Add database
node1 to the replication server.
Step 13: Add database node2 to the replication server.
Step 14: Join database
node2 to the publication.
Step 15: Take an initial snapshot after which you should see the initial two rows loaded into the
node1 database now in the
node2 database as well.
Note: Stop streaming before you execute the startsnapshot command with the reload option, otherwise the operation will fail (an error message is logged in the server). Once the snapshot is completed explicitly restart streaming.
Step 16: Run the
checksnapshot command (after a few seconds) to confirm if the data is replicated on the target node.
Step 18: Insert additional rows into
node1.
Note: Node 1 and node 2 should have the same rows.
Note: leavepub command should be used for the databases which are joined to the publication using the
joinpub command.
Note: removepub command should be used for publications which are created using the
createpub command.
Note: Before using the
removedb command, use the
leavepub command to disconnect the database from all the publications it had joined with the
joinpub command. Also, make sure to remove all the publications created in the database using the
removepub command.