Skip to content

DOC-12667 Server XDCR and mobile coexistence for 7_6_6 #3801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 25 commits into
base: release/7.6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ include::third-party:partial$nav.adoc[]
**** xref:learn:clusters-and-availability/xdcr-filtering.adoc[XDCR Advanced Filtering]
**** xref:learn:clusters-and-availability/xdcr-conflict-resolution.adoc[XDCR Conflict Resolution]
**** xref:learn:clusters-and-availability/xdcr-with-scopes-and-collections.adoc[XDCR with Scopes and Collections]
**** xref:learn:clusters-and-availability/xdcr-enable-crossclusterversioning.adoc[XDCR enableCrossClusterVersioning]
**** xref:learn:clusters-and-availability/xdcr-active-active-sgw.adoc[XDCR Active-Active with Sync Gateway]
*** xref:learn:clusters-and-availability/groups.adoc[Server Group Awareness]
* xref:learn:security/security-overview.adoc[Security]
** xref:learn:security/authentication.adoc[Authentication]
Expand Down
7 changes: 7 additions & 0 deletions modules/introduction/pages/whats-new.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ If you are performing a backup/restore operation on a Couchbase Server 7.6.x clu
ensure that you use `cbbackupmgr` version 7.6.
====

[#new-features-766]
== New Features and Enhancements in 7.6.6

The following new features are provided in this release

include::partial$new_features-76_6.adoc[]

[#new-features-764]
== New Features and Enhancements in 7.6.4

Expand Down
7 changes: 7 additions & 0 deletions modules/introduction/partials/new_features-76_6.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[#new-features-766-xdcr]
=== XDCR

* *https://jira.issues.couchbase.com/browse/MB-57921[MB-57921]:*
Activated the usage of an already existing bucket property `enableCrossClusterVersioning` (ECCV). When `enableCrossClusterVersioning` is set to `true`, for each document processed by XDCR, XDCR stores an internal history of the document in the extended attributes. This set of information is also called Hybrid Logical Vector (HLV), which is a set of Hybrid Logical Clock (HLC) information. For more information about the `enableCrossClusterVersioning` property and the HLV metadata, see xref:learn:clusters-and-availability/xdcr-enable-crossclusterversioning.adoc[XDCR enableCrossClusterVersioning].
+
Created provision to set up XDCR Active-Active replication with Sync Gateway. You can configure an active-active XDCR setup with both Sync Gateway (SGW) and mobile applications on the XDCR source and target clusters. The bucket property `enableCrossClusterVersioning` must be set to `true` to use the `mobile=[Off | Active]` flag, and this flag in turn enables the setting _XDCR Active-Active with Sync Gateway 4.0+_. For more information about XDCR Active-Active with Sync Gateway 4.0+, see xref:learn:clusters-and-availability/xdcr-active-active-sgw.adoc[XDCR Active-Active with Sync Gateway].
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
= XDCR Active-Active with Sync Gateway
:description: pass:q[Using XDCR Active-Active replication with Sync Gateway, you can configure an active-active XDCR setup with both Sync Gateway (SGW) and mobile applications on the XDCR source and target clusters.]

[abstract]
{description}

[#xdcr-active-active-sgw-intro]
== Introduction

In the versions earlier than Server 7.6.6 and Sync Gateway (SGW) 4.0.0, only an active-passive setup was supported with both XDCR and SGW. XDCR Active-Active replication with Sync Gateway for XDCR-Mobile interoperability configuration is introduced in the Server 7.6.6 version, where you can configure an active-active XDCR setup with Sync Gateway (SGW) and mobile applications both on the XDCR source and target clusters. You need to have at least a Server 7.6.6 version and SGW 4.0.0 version to use this setup.

[IMPORTANT]
====
Here are a few limitations to the XDCR active-active with Sync Gateway feature.

* If you use the user created extended attributes (xattrs) in your documents, and you have more than 10 user xattrs in a document, then you cannot use the feature _XDCR Active-Active with Sync Gateway_. This is due to an internal limitation of managing extended attributes in a document. If you try to use the feature _XDCR Active-Active with Sync Gateway_ when you have more than 10 user xattrs in your document, the XDCR replication **silently skips** replicating the document that has more than 10 user xattrs. As a result, the data in the replication skipped documents will not be consistent between the target and source clusters. The only way you will know this skip occured is because the Prometheus stat **subdoc_cmd_docs_skipped** will be incremented and the document will _not_ be consistent between the target and source.
* Eventing Service cannot yet be used in a Sync Gateway 4.0+ version or in an XDCR bi-directional replication environment because a metadata update occurs causing XDCR to ping-pong and never stop replicating in an Active-Active XDCR environment. However, one-way replication is possible.
====

You can configure XDCR Active-Active with Sync Gateway for XDCR-Mobile interoperability using one of the following methods:

* Greenfield deployment: Set up a new active-active configuration with both XDCR and SGW.
* Upgrading an existing setup: Convert an existing active-passive XDCR-SGW configuration to an active-active XDCR-SGW setup.

NOTE: When using XDCR Active-Active with Sync Gateway, where Sync Gateway version is 4.0+ and Server version is 7.6.6, the replication target XDCR inbound user must have the RBAC roles, XDCR Inbound role and the Data Writer role.

[#xdcr-active-active-sgw-prerequisites]
== Prerequisites

Set the bucket property `enableCrossClusterVersioning` to use the setting `mobile=Active`. To enable the bucket property `enableCrossClusterVersioning` using REST API or from the UI, see xref:learn:clusters-and-availability/xdcr-enable-crossclusterversioning.adoc[XDCR enableCrossClusterVersioning].

[#xdcr-active-active-sgw-greenfield-deployment]
== Greenfield Deployment

To configure a new active-active XDCR with SGW setup, do the following:

. Create two clusters on Server 7.6.6 or a higher version with _all_ the nodes of the clusters, for example, cluster A and cluster B (or you can upgrade the existing Server clusters to 7.6.6 or a higher version).
. Create buckets, for example, B1 and B2 in cluster A and cluster B respectively, between which XDCR will be set up. Now, do the following:
.. Enable the ECCV setting on B1. All the mutations in B1 will have a new metadata called HLV.
.. Enable the ECCV setting on B2. All the mutations in B2 will have a new metadata called HLV.
+
NOTE: ECCV refers to the bucket property `enableCrossClusterVersioning`.
+
. Create an XDCR from B1 to B2 by setting `mobile=Active`. Also, create an XDCR from B2 to B1 by setting `mobile=Active`. For information about creating an XDCR, see xref:manage:manage-xdcr/create-xdcr-replication.adoc[Create a Replication].
. Configure SGW 4.0.0 version on each cluster, cluster A and cluster B.

This setup can handle application traffic on both buckets B1 and B2 of the respective clusters along with SGW import into both the buckets simultaneously.

[#xdcr-active-active-sgw-upgrade]
== Upgrading an existing setup

Convert an existing active-passive XDCR-SGW setup into an active-active XDCR-SGW setup.

For illustration, there are two clusters, A and B. An SGW is connected to cluster A and this cluster is active. Cluster B is passive with XDCR setup from bucket B1 in cluster A to bucket B2 in cluster B. The current application traffic should be only on bucket B1 of cluster A.

.Replication before upgrade: XDCR Active-Passive with SGW
image::clusters-and-availability/xdcr-active-sgw-before-upgrade.png[,720,align=left]

. Upgrade both clusters A and B with _all_ the nodes of the clusters to Server 7.6.6 or a higher version.
. Enable ECCV on bucket B1. All the mutations in B1, after this point of time, will have a new metadata called HLV.
+
NOTE: ECCV refers to the bucket property `enableCrossClusterVersioning`.
+
. Enable ECCV on bucket B2. All the mutations in B2, after this point of time, will have a new metadata called HLV.
. Update the replication settings to `mobile=Active` of the already existing XDCR from B1 to B2.
. Create an XDCR from B2 to B1 with the replication settings as `mobile=Active`.
. Upgrade SGW on cluster A to the version 4.0.0.
. Connect SGW version 4.0.0 to cluster B.
. Enable application active traffic on cluster B.

This setup can handle application traffic on both buckets B1 and B2 of the respective clusters along with SGW import into both the buckets simultaneously.

This is an illustration of the final configuration:

.Replication after upgrade: XDCR Active-Active with SGW
image::clusters-and-availability/xdcr-active-sgw-after-upgrade.png[,720,align=left]

Loading