Defining latency and throughput in CDC Replication

Latency is defined as the amount of time that passes between when a change occurs on a source table and the change is applied to the target table. It can also be referred to as replication lag.

For example, if an application inserts a row in a subscription's source table at 10:00 AM and CDC Replication applies the row to the target table at 10:15 AM, the latency for the subscription is 15 minutes. High latency means that the target is not keeping up with the source, although this is generally not an indication of synchronization issues between your source and target. The target is merely synchronized with the source at some point in the recent past because of the delay due to latency.

Throughput is a measure of the rate at which data changes are retrieved, sent, and applied on the target system. Throughput measures the quantity of data processed within a given period of time. If your source database produces high volumes of data changes (a heavy workload), your target system must be able to handle a high throughput or latency may increase.

Often performance goals are defined as specific throughput goals. It is more appropriate to define your performance goals in terms of acceptable latency.

The Performance view in Management Console allows you to measure the performance of several components in the CDC Replication replication pipeline and determine if there are bottlenecks. Increased latency is often the first indication that there is a performance issue in your replication environment.

There are several factors that may contribute to increased latency between your source and target systems:

  • Size of database transactions
  • Database delay in writing changes to the log
  • Relative size/performance of the source and target databases
  • Hardware factors such as available physical memory, CPU availability, disk I/O performance
  • Complexity of transformations – homogeneous versus heterogeneous replication
  • Available communication bandwidth

Your business needs and performance criteria will determine the level of latency that is acceptable in your production environment. You must determine if there is enough business value in your configuration and functionality for the amount of latency you are experiencing. If there is not enough business value in your current configuration, you will have to make changes to decrease your latency.