Nearly synchronous mode for HDR replication

When you use nearly synchronous mode for HDR replication, the primary server flushes the logical-log buffer to disk after receiving acknowledgement that the HDR secondary server received a transmitted transaction. The primary server does not wait for acknowledgement that the transaction was committed on the HDR secondary server.

When the log transmission buffer contains many log records, the application of those log records on the HDR secondary server requires more time. Nearly synchronous mode for HDR replication provides better performance than fully synchronous mode, and better data integrity than asynchronous mode.

The primary server stores the following near-synchronization information in its reserved page:
  • The number of unprocessed data replication buffers queued to the drprsend thread.
  • The log unique value, the page number for the most recently paged log.
  • The pointer to the thread-control block (TCB), the thread id in parentheses, and the log sequence number (LSN) of the commit that was performed by that thread.
  • The LSNs of commits that are waiting for acknowledgement of being received on the HDR secondary.
To view this information, run the onstat -g dri que command.
HDR nearly synchronous mode has the following requirements:
  • The DRINTERVAL configuration parameters on the primary and HDR secondary server must be set to -1, or the DRINTERVAL configuration parameter on the primary server must be set to 0.
  • The DRTIMEOUT configuration parameters on the primary and HDR secondary server must be set to the same value.
  • The operating-system time on the primary and HDR secondary servers must be synchronized.
To turn on nearly synchronous data replication, set the DRINTERVAL configuration parameter to 0, and then use one of the following methods:
  • Set the HDR_TXN_SCOPE configuration parameter to NEAR_SYNC.
  • Run SET ENVIRONMENT HDR_TXN_SCOPE 'NEAR_SYNC';