Active-active and no data loss. Is it possible? #18457
-
Is your feature request related to a problem? Please describe. Describe the solution you'd like Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
We would like to have pulsar clusters in two data centers. They are active and active. And we would like to replicate messages from one site to the other. i.e. the subscriber from one site will receive messages from publishers at two sites. And no message loss. If one site is down, the other site can continue to work. |
Beta Was this translation helpful? Give feedback.
-
The geo-replication is asynchronous, but it does not result in message loss. The replication state is stored in a cursor(ledger backend), even the broker crash, the replication state not lost. So the new broker can resume the replicate task. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Yes, it is stored in bookies(data is replicated in the certain bookies). So you can increase the data replicas to avoid data loss. |
Beta Was this translation helpful? Give feedback.
-
Thank you. So I understand from you that there is a mechanism to trace or manage which message is replicated and make sure all messages are replicated. That is great. |
Beta Was this translation helpful? Give feedback.
-
Yes, the metrics related to the replication is described at https://pulsar.apache.org/docs/en/reference-metrics/#replication-metrics-1, and https://github.com/streamnative/apache-pulsar-grafana-dashboard already contains message replication related dashboards. You can checkout and try it. |
Beta Was this translation helpful? Give feedback.
-
Thanks. Was trying this dashboard. Had some problems and will figure out why. |
Beta Was this translation helpful? Give feedback.
-
Would like to clarify for geo-replication message delivery. Is it more like TCP, every message got acknowledged when it is replicated successfully to the other site, or more like UDP, fire and forget? |
Beta Was this translation helpful? Give feedback.
The geo-replication is asynchronous, but it does not result in message loss. The replication state is stored in a cursor(ledger backend), even the broker crash, the replication state not lost. So the new broker can resume the replicate task.