What's the difference between sync and async acknowledgement in AMPS replication?
The difference between sync replication and async replication is when AMPS tells the publisher that the message has been persisted.
With sync replication, AMPS does not acknowledge to the publisher that a message has been persisted until downstream instances acknowledge that the message has been persisted.
With async replication, AMPS acknowledges to the publisher that a message has been persisted when AMPS acknowledges that the message has been persisted.
There is no difference in when AMPS writes the message to the transaction log, when AMPS sends the message to downstream replication instances, or how quickly AMPS replicates the message. By default, there is no difference in when the message is available to subscribers.
Because the difference affects publishers, it is important to control failover across an replication link that is using async
acknowledgement. For example, if a publisher fails over across a link that uses async
acknowledgement, the publisher can produce a gap in its publish stream. Likewise, a subscriber that uses bookmark replay must use caution in failing over across a link that uses async
acknowledgement.
A replay from the transaction log (that is, a bookmark subscription) can optionally specify the fully_durable
option on the subscription. When this option is present, AMPS will not provide a message to a subscriber until AMPS would acknowledge the message to a publisher. This means that a subscription that uses fully_durable
will not receive messages until all replication destinations configured for sync
acknowledgement have acknowledged the message.
Last updated