Sunday, 10 October 2021

Replication Modes of SAP HANA System Replication

Check the Prerequisites for Configuring SAP HANA System Replication using below link,

While registering the secondary system for replication, we may specify the replication mode to use otherwise the default replication mode will use.

Following are the different SAP HANA replication modes for the redo logs,

Synchronous in-memory (SYNCMEM) :- 
The secondary system sends an acknowledgment back to the primary system as soon as the data is received in memory.  When the connection to the secondary system is lost, the primary system continues the transaction processing and writes the changes only to the local disk. Data loss can occur when primary and secondary fail at the same time as long as the secondary system is connected or when a takeover is executed, while the secondary system is disconnected.
This option provides better performance because it is not necessary to wait for disk I/O on the secondary system, but it is more vulnerable to data loss. The disk I/O speed on the secondary system doesn't influence the primary's performance.

Synchronous (SYNC) :-

The primary system waits with committing the transaction until it gets a reply that the log is persisted in the secondary system. This option guarantees immediate consistency between both systems.

When the connection to the secondary system is lost, the primary system continues the transaction processing and writes the changes only to the local disk. No data loss occurs in this scenario as long as the secondary system is connected. Data loss can occur, when a takeover is executed while the secondary system is disconnected.

Additionally, this replication mode can run with a full sync option. This means that log write is successful when the log buffer has been written to the log file of the primary and the secondary system. When the secondary system is disconnected, the primary system suspends the transaction processing until the connection to the secondary system is reestablished. No data loss occurs in this scenario. 
 Prerequisites for Configuring Full Sync option,
  • Configure your system replication with the SYNC replication mode. 
  • Check that the system replication status is active and in sync for all services. 
  • Enable the full sync option with hdbnsutil -sr_fullsync --enable
The full sync option can be switched on and off using the command:
hdbnsutil -sr_fullsync --enable|--disable

Asynchronous (ASYNC) :
The primary system commits the transaction after sending the log without waiting for a response. Here we have no delay because the data transmission is asynchronous to the transaction in the primary system.

This option provides better performance because it is not necessary to wait for log I/O on the secondary system. Database consistency across all services on the secondary system is guaranteed. However, it is more vulnerable to data loss. Data changes may be lost during takeover.

Replication Mode Change Command :-
hdbnsutil -sr_changemode --mode=sync|syncmem|async
Replication Mode Status check Command :-
hdbnsutil -sr_state --sapcontrol=1
Replication Modes of SAP HANA System Replication
Thanks for reading, Please share your valuable feedback.  

Share this

0 Comment to "Replication Modes of SAP HANA System Replication"

Post a Comment