## 2.2 Replication Modes for SAP HANA System Replication
While registering the secondary system, you need to decide which replication mode to use.
SAP HANA offers different modes for the replication of the redo log:
## Replication modes
| Log Replication Mode             | Description                                                                                                                                                                                                                                                                                                                                                    |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Synchronous in-mem­ ory (SYNCMEM) | The primary system commits the transaction after it gets a reply that the log was received by the secondary system and stored in memory. The delay for the transaction in the primary system is smaller, because it only includes the time for transmitting the data. The disk I/O speed on the sec­ ondary system doesn't influence the primary's performance. |
|                                  | When the connection to the secondary system is lost, the primary system continues the transac­ tion processing and writes the changes only to the local disk.                                                                                                                                                                                                   |
|                                  | Data loss can occur in the following situations:                                                                                                                                                                                                                                                                                                               |
|                                  | ● When the primary and the secondary system fail at the same time while the secondary sys­ tem is connected. The data is not written to disk - neither on the primary nor on the secon­ dary system. ● When a takeover is executed while the secondary system is unavailable. The data that on the secondary is outdated compared to the data on the primary.    |
|                                  | arrived                                                                                                                                                                                                                                                                                                                                                        |
|                                  | 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.                                                                                                                                                                                                      |
| Log Replication Mode       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Synchronous on disk (SYNC) | The primary system waits with committing the transaction until it gets a reply that the log is per­ sisted in the secondary system. This option guarantees immediate consistency between both sys­ tems, at a cost of delaying the transaction by the time for data transmission and persisting in the secondary system. When the connection to the secondary system is lost, the primary system continues the transac­ tion 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 suc­ cessful when the log buffer has been written to the log file of the primary and the secondary sys­ tem. When the secondary system is disconnected (for example, because of network failure), the primary system suspends the transaction processing until the connection to the secondary sys­ tem is reestablished. No data loss occurs in this scenario. You can set the full sync option for sys­ tem replication with the parameter [system_replication]/enable_full_sync . |
| Asynchronous (ASYNC)       | Replication . 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|                            | sec­ ondary 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
The replication mode can be changed without going through a full data shipping from the primary system to the secondary system afterwards. For more information, see Changing the Replication Mode .
## Related Information
Full Sync Option for SAP HANA System Replication [page 58] Changing the Replication Mode [page 62]