Elasticsearch cross cluster replication - bi-directional is not working

Hi

We need to do the cross cluster replication to avoid the downtime in our environment

It is working fine in the single/uni directional DR datacenter and the leader index is replicating fine the follower index

but when we do the bi-direction with following the official document it is not working

we are using es 7.17.x with xpack enabled and we have verified the remote cluster connection with _remote/info also

Bi-directional replication is basically 2 uni-directional replications in the opposite direction for different indices so I do not see why it would not work if it works in one direction.

It would help if you provided information of how you set it up, the configuration of the clusters and any error messages you have encountered.

Hi @Christian_Dahlqvist

unidirectional is working fine.

bi-directional replication alone not working for us, we are getting the below error when we do the indexing and update from the follower index side

"type" : "status_exception",
"reason" : "a following engine does not accept operations without an assigned sequence number"

we have added the node role remote_cluster_client in yml
updated the cluster settings and verified the connection with _remote/info

That's the expected outcome of trying to write directly to a follower index. You need to write to the leader index.

If you look in the documentation you can see that the bi-directional replication consists of 2 pairs or leader-follower where you write to the local leader. You can not do this with a single index.

we have checked this creating a index "textz" in one cluster "clusterA" and followed the same index in other cluster "clusterB"

we can able to see the leader index data in follower index ince it is been followed

after that we have deleted the leader index and do the unfollow on the follower side and still the data is present in follower side

our questn is while the leader side is down we need to make the replication stop by doing unfollow on the indices and make the follower cluster for index/writing

during this time we will face data loss / downtime ?

If you have uni-directional replication and want/need to make the follower index a normal index I would recommend you follow the instructions in the docs.

Until the follower has been changed to a normal index that is not read-only after the leader has failed you will not be able to write to the index, which I assume could result in data loss.