synchronous etcd Replica cluster

38 views
Skip to first unread message

SO

unread,
May 16, 2025, 1:42:10 PMMay 16
to etcd-dev
Hi,

I know it's possible to setup asynchronous etcd cluster replication using `etcdctl make-mirror`. However does anyone know if it's possible to have replica etcd cluster that is synchronously replicated based on another ectd cluster in the same region (RTT < 10ms) similar to how is done in CloudNativePG.
Thanks

Benjamin Wang

unread,
May 16, 2025, 2:02:31 PMMay 16
to SO, etcd-dev
Hi,

The etcdctl make-mirror command watches one cluster, and writes the watch response to another etcd cluster. It's just a simple tool, not a production ready solution. I would suggest to implement a similar tool/service, and I think there are a couple of caveats to implement such a tool/service,
1. To ensure there is no duplication, no loss of data. The only way is to depend on the revision. If the tool/service somehow crashes or interrupts, you will need to watch starting from the previous last revision + 1.
2. The etcd watcher only watches the key space. It means you can only sync the key/value data, but not include changes in any other space/buckets, i.e. membership data, lease, alarm etc.

If you just want to transfer data from one cluster to another cluster one time, then backup and restore is still the simplest and robust way. If you want to do it online, i.e. transfer cluster from one region or AZ  to another region or AZ (of the same region), one solution that I can think of (also I did several years ago) is to transfer the member/node one by one. For example, add a member in the target region or AZ into the source cluster, once its local data is in sync with the leader, remove a member from the source cluster; repeat the step until all members are transferred to the target region or AZ.

Hope this helps.

Benjamin

--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/etcd-dev/4bab49e7-4b13-47df-a213-a394dccccd22n%40googlegroups.com.

This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Reply all
Reply to author
Forward
0 new messages