High Availability Guide : Using HotStandby with applications : Configuring advanced replication with HotStandby
  
Configuring advanced replication with HotStandby
Any node of a advanced replication system can be made highly available with the solidDB® HotStandby component.
When the master and replica databases of a advanced replication system are synchronizing data, the synchronization occurs between the Primary servers of the database server pairs. In other words, the Primary of the Master communicates with the Primary of the Replica. See HotStandby and advanced replication.
A database server may fail over to its Secondary server at any point of time, including when the database server is synchronizing data with another server using advanced replication. If the failover occurs during synchronization, executing the synchronization message stops and the process must be resumed after the failover. For details about how to resume synchronization after an error has occurred, refer to the solidDB® Advanced Replication User Guide.
If a server containing a master database is made fault tolerant with solidDB® HotStandby, the replicas of the master database must know the connect strings to both master servers. To do this, execute the following statement in each of the replica databases:
SET SYNC CONNECT 'connect_string_to_server_1,                   connect_string_to_server_2'
TO MASTER master_nodename
In the diagram below, the gray arrows represent the original connections to the original Primary server, while the black arrows represent the new connections to the new Primary (old Secondary) server. The alternate connection is used if the synchronization with the old Primary server fails.
If the server using solidDB® HotStandby is a server containing a replica database and if the master server uses remote procedure calls (CALL procedure_name AT node_name) to run procedures at the replica, for example to initiate the synchronization, the master server must be informed about the connect strings to both of the replica servers. Typically a master server uses remote procedure calls to initiate synchronization with a replica database. To inform the master about the connect strings to the replica server pair, execute the following statement in the master database:
SET SYNC CONNECT 'connect_string_to_server_1, connect_string_to_server_2' TO REPLICA replica_nodename
Alternatively, you can save the statement in the replica server and propagate it to master the next time that you synchronize. In that case, use the following statement:
SAVE SET SYNC CONNECT 'connect_string_to_server_1, connect_string_to_server_2' TO REPLICA replica_nodename
1 Failover in ReplicaDB
2 SET SYNC CONNECT 'tcp machine4 1315' REPLICA TO replicaDB1
If the master server never executes remote procedure calls in the replica, the above statement is not needed.
See also
Using HotStandby with applications