Modes of Stream Replication

You can replicate streams in one of two replication modes. You specify the mode per source-replica pair.

Asynchronous replication

In this replication mode, MapR Event Store For Apache Kafka confirms to producers that messages are published after the messages are placed in partitions. Messages are replicated in the background. Therefore, the latency of message publishing is not affected by the time required for the network round trip between the source cluster and the destination cluster.

This type of replication is well-suited for clusters that are geographically separated in wide-area networks.

Asynchronous replication is the default replication mode.

Synchronous replication

In this replication mode, MapR Event Store For Apache Kafka confirms to producers that messages have been placed in partitions only after the messages are sent to a gateway in the destination cluster.

Because of the confirmations that MapR Event Store For Apache Kafka receives on source clusters, synchronous replication is especially well-suited for creating a backup of your data for disaster recovery.

When the latency of a replication stream is high, MapR Event Store For Apache Kafka switches to asynchronous replication temporarily so that producers are not blocked indefinitely. After the latency is sufficiently reduced, MapR Event Store For Apache Kafka switches back to synchronous replication.

The same switching from synchronous to asynchronous replication occurs if all gateways fail. MapR Event Store For Apache Kafka does not resume synchronous replication until a new gateway is established or at least one of the failed gateways is restarted.