Reference architecture for reverse checkpointing
To effectively use reverse checkpointing, implement a four-topic architecture across your primary and backup clusters. This setup ensures that consumers receive all records—newly produced and replicated—while maintaining offset consistency during failover and failback.
Topic configuration
Configure your topics for bidirectional replication with distinct original topics on each cluster:
- Primary cluster
- Create a topic to serve as the original topic during normal operation. This corresponds to
the
Paymentstopic on the left side of the diagram. - Backup cluster
- Create a topic with the same name to serve as the original topic during disaster recovery.
This corresponds to the
Paymentstopic on the right side of the diagram.
With bidirectional replication enabled, SRM creates replica topics for each of your original
topics. These are shown as the prefixed P.Payments and
B.Payments topics on the diagram.
Client configuration
Configure producers and consumers based on the operational state of the cluster:
- Normal operation
-
- Producers
- Write to the original topic on the primary cluster (
Paymentson the left). - Consumers
- Subscribe to the original topic on the primary cluster (
Paymentson the left) and the replica topic from the Backup cluster (B.Paymentson the left).
- Disaster recovery
-
- Producers
- Write to the original topic on the backup cluster (
Paymentson the right). - Consumers
- Subscribe to the original topic on the backup cluster (
Paymentson the right) and the replica topic from the Primary cluster (P.Paymentson the right).
Failback synchronization
During failback, offset synchronization to the primary cluster is not instantaneous. To prevent consumers from reading old offsets or reprocessing data consumed on the backup, wait for the synchronization to finish before redirecting consumers back to the primary cluster.
