-
Notifications
You must be signed in to change notification settings - Fork 182
DOC-14009 XDCR Support for CNG #4104
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
rao-shwe
wants to merge
18
commits into
release/8.5
Choose a base branch
from
DOC-14009-xdcr-support-for-cng
base: release/8.5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e58bbf0
DOC-14105-Update Compatibility matrix to include 8.0
supritha-kumar 21ced85
updated compatibility matrix
supritha-kumar fc650fd
Updated compatibility matrix to include 8.0 and remove versions prior…
supritha-kumar 3659400
corrected syntax of columns
supritha-kumar 6dd1d63
Updated the text above the version compatibility table and removed ex…
supritha-kumar c4e7592
updated minor changes and some Vale suggestions
supritha-kumar bae91e1
corrected an empty space - line 113
supritha-kumar 20f9e34
initial-draft-of-xdcr-cng
rao-shwe b419a30
minor edits
rao-shwe 773dc18
Updated xdcr-support-for-cng.adoc
supritha-kumar ccc00dc
Updated create-xdcr-reference.adoc
supritha-kumar a4444a1
Updated xdcr-support-for-cng.adoc
supritha-kumar 4cbea3c
Updated create-xdcr-reference.adoc
supritha-kumar c5f0ead
Updated xdcr-support-for-cng.adoc
supritha-kumar 7b71b4b
Merge branch 'DOC-14009-xdcr-support-for-cng' of https://github.com/c…
supritha-kumar 4ef6e95
Vale and style guide changes
supritha-kumar 5bfd964
Updated docs review comments
supritha-kumar ce2ac17
docs comments
supritha-kumar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
193 changes: 193 additions & 0 deletions
193
modules/learn/pages/clusters-and-availability/xdcr-support-for-cng.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,193 @@ | ||
| = XDCR Support for Cloud Native Gateway | ||
| :description: pass:q[Learn how to configure and use XDCR with Cloud Native Gateway (CNG) to replicate data across Couchbase clusters using gRPC instead of using direct node-to-node connections.] | ||
| :page-edition: Enterprise Edition | ||
| :page-toclevels: 3 | ||
|
|
||
| [abstract] | ||
| {description} | ||
|
|
||
| This feature allows XDCR to replicate data to a target cluster through its CNG interface, using gRPC over HTTPS instead of direct node-to-node Couchbase connections. | ||
|
|
||
| This document covers the concepts, configuration, usage, and behavior of XDCR over CNG for Couchbase Server administrators and operators. | ||
| For information about CNG deployment, see xref:cloud-native-gateway::intro/about-cng.adoc[About Cloud Native Gateway]. | ||
|
|
||
| IMPORTANT: This feature is available in Couchbase Server Enterprise Edition only. | ||
| It's not available in Couchbase Server Community Edition. | ||
|
|
||
| == Cloud Native Gateway in Couchbase | ||
|
|
||
| The Couchbase Cloud Native Gateway (CNG) provides a gRPC interface to Couchbase services so that Couchbase clients do not need to be aware of cluster topology details. | ||
| CNG uses a set of RPC network endpoints based on gRPC over HTTP/2, an efficient binary wire protocol suited to the high performance of Couchbase Server. | ||
|
|
||
| CNG allows the details of a cluster to be hidden behind a single service endpoint. | ||
| Applications and clients connect to a single hostname and port and are load-balanced across that service. | ||
| Cloud Native Gateway handles cluster topology changes transparently, so nothing changes within the cluster itself when clients connect through CNG. | ||
|
|
||
| == Deploying CNG | ||
|
|
||
| In Kubernetes environments, Cloud Native Gateway is deployed as a sidecar image alongside each Couchbase Server node. | ||
| The sidecar is managed by the Couchbase Autonomous Operator (CAO). | ||
| Kubernetes load balancers and OpenShift routes can be configured to expose the CNG service to clients outside the cluster. | ||
|
|
||
| == Using CNG for XDCR | ||
|
|
||
| Couchbase clients, including XDCR, are smart clients that are cluster topology-aware and connect directly to the node where data is located. | ||
| In cloud environments, this requires exposing multiple ports on every node across an entire cluster, which creates significant complexity and friction in the following scenarios: | ||
|
|
||
| * OpenShift and Kubernetes environments: | ||
| OpenShift Routes and Kubernetes Ingress objects only support HTTP/HTTPS traffic. | ||
| With CNG, instead of a custom solution to expose all of the cluster's nodes externally, you can use the standard approaches for exposing cluster services. | ||
| For example, you can use OpenShift Routes and Kubernetes LoadBalancer to just expose CNG. | ||
| For more information, see xref:cloud-native-gateway::intro/about-cng.adoc[About Cloud Native Gateway]. | ||
| * Private Link environments: | ||
| Cloud Service Provider (CSP) private link services expect a single load-balanced resource. | ||
| The configuration required for direct XDCR node-to-node connections is complex and difficult to maintain. | ||
| * General cloud networking: | ||
| Any network interface or proxy that supports HTTPS or gRPC works naturally with CNG, whereas direct XDCR connections require custom solutions that are environment-specific and fragile. | ||
|
|
||
| CNG allows the XDCR connection to flow over a single gRPC interface, eliminating the need to expose the target cluster topology and simplifying all of the above networking scenarios. | ||
|
|
||
| == CNG for Incoming Connections | ||
|
|
||
| CNG fronts incoming connections to a cluster. | ||
| When a target cluster has CNG deployed, incoming XDCR connections from a source cluster can connect through CNG. | ||
|
|
||
| NOTE: For bidirectional XDCR using CNG, both clusters must have CNG installed, since each cluster acts as a target for traffic from the other. | ||
|
|
||
| == Version and Environment Requirements | ||
|
|
||
| This section outlines the version and environment requirements for deploying and using XDCR over Cloud Native Gateway. | ||
|
|
||
| === Version Requirements | ||
|
|
||
| The following version requirements apply to XDCR over CNG: | ||
|
|
||
| [cols="1,1,2",options="header"] | ||
| |=== | ||
| |Replication Role |Component |Requirement | ||
|
|
||
| |Source cluster | ||
| |Couchbase Server | ||
| |8.5 | ||
|
|
||
| |Source cluster | ||
| |Cloud Native Gateway | ||
| |Not required on source cluster | ||
|
|
||
| |Target cluster | ||
| |Couchbase Server | ||
| |Any version that supports CNG (earlier versions are supported as target; however, both clusters must support Couchbase Server 8.5 or later for bidirectional CNG replication) | ||
|
|
||
| |Target cluster | ||
| |Cloud Native Gateway | ||
| |CNG version 1.2.1 or later | ||
| |=== | ||
|
|
||
| IMPORTANT: The Couchbase Server on the source cluster must be running Couchbase Server 8.5 or later, as the XDCR in the Server must understand the gRPC protocol and support Cloud Native Gateway as a target. | ||
| The target cluster must have Cloud Native Gateway version 1.2.1 or later, as 1.2.1 includes XDCR support. | ||
|
|
||
| === One-Way vs Two-Way Replication Requirements | ||
|
|
||
| [cols="1,2,2",options="header"] | ||
| |=== | ||
| |Replication Type |Source Cluster Requirements |Target Cluster Requirements | ||
|
|
||
| |One-way (unidirectional) | ||
| |8.5 | ||
| CNG not required. | ||
| |CNG with XDCR support installed. | ||
| Server version can be any version that works with CNG 1.2.1. | ||
|
|
||
| |Two-way (bidirectional) | ||
| |8.5 | ||
| CNG with XDCR support installed (acting as a target). | ||
| |8.5 | ||
| CNG with XDCR support installed (acting as a target). | ||
| |=== | ||
|
|
||
| NOTE: In a bidirectional setup, each cluster is both an XDCR source and a target. | ||
| As a source, it must be running Couchbase Server version 8.5. | ||
| As a target, it must have CNG version 1.2.1 or later installed. | ||
|
|
||
| == Limitations | ||
|
|
||
| The following limitations apply to the initial release of XDCR support for CNG: | ||
|
|
||
| * *HLV-enabled buckets*: Buckets that have `enableCrossClusterVersioning` set to `true` cannot be used with XDCR over CNG. | ||
| Attempting to create a replication with an HLV-enabled bucket returns an error. | ||
| * *xdcrDiffer*: The `xdcrDiffer` tool does not support CNG in Phase 1. | ||
| Attempting to use `xdcrDiffer` with a CNG remote reference returns an error. | ||
| * *Conflict Logging*: Conflict logging is not supported for XDCR over CNG since Conflict logging requires cross cluster versioning to be enabled on the bucket. | ||
| * *Sync Gateway Interop*: Mobile buckets (Sync Gateway / App Services) are only supported for one-way (uni-directional) XDCR replication with CNG since bidirectional support requires cross cluster versioning to be enabled on the bucket. | ||
|
|
||
| == How XDCR over CNG Works | ||
|
|
||
| This section explains how XDCR communicates with the target cluster through Cloud Native Gateway, including the connection model, protocol switching capabilities, and error handling mechanisms. | ||
|
|
||
| === Connection Model | ||
|
|
||
| When a remote cluster reference is created with the `couchbase2://` prefix, XDCR transmits data over HTTPS using the gRPC protocol. | ||
| By default, this traffic uses port 18098 on the Cloud Native Gateway. | ||
|
|
||
| The CNG on the target cluster handles load balancing and routes traffic to the appropriate nodes and vBuckets within the target cluster. | ||
| Cluster topology changes in the target cluster are handled by CNG transparently. | ||
| The source cluster XDCR process does not need to track or update topology maps for the target. | ||
|
|
||
| === Protocol Switching | ||
|
|
||
| XDCR supports dynamically switching a remote cluster reference between CNG-based and direct node-to-node connections. | ||
| When the remote reference for an existing replication is updated to change between these 2 protocols, for example, switching from `couchbase2://` to a direct cluster hostname or vice versa, the replication resumes using the existing XDCR checkpoints. | ||
|
supritha-kumar marked this conversation as resolved.
|
||
| No data needs to be re-replicated from the beginning. | ||
| For more information, see xref:manage:manage-xdcr/create-xdcr-reference.adoc#switching-protocols[Switching Protocols]. | ||
|
|
||
| This means that in a multi-cluster XDCR topology, some replication legs can use CNG while others use direct node-to-node connections. | ||
|
|
||
| NOTE: Updating the remote reference's hostname or protocol may require updating the root certificate if the CNG certificate differs from the direct cluster certificate. | ||
|
|
||
| === Error Handling | ||
|
|
||
| XDCR returns clear error messages in the following scenarios: | ||
|
|
||
| * If `couchbase2://` is specified but CNG is not installed or available on the target cluster, XDCR returns an error stating that CNG was not found on the target and advises trying without the `couchbase2://` prefix if direct node-to-node connections are available. | ||
| * If `couchbase2://` is not specified but direct node-to-node connections are failing and the target cluster has CNG enabled, XDCR returns an error suggesting that the user try the `couchbase2://` prefix. | ||
|
|
||
| XDCR does not attempt to automatically infer or switch the protocol. | ||
| The user is responsible for choosing the correct prefix and for acting on the error messages. | ||
|
|
||
| == Deployment Use Cases | ||
|
|
||
| This section describes common deployment scenarios for XDCR over Cloud Native Gateway, including self-managed clusters, Kubernetes and OpenShift environments, and hybrid deployments with Capella. | ||
|
|
||
| === Self-Managed to Self-Managed | ||
|
|
||
| Two self-managed clusters, both running Couchbase Server 8.5, can replicate data using XDCR over CNG. | ||
| This enables bidirectional replication without requiring direct node-to-node network access between the clusters. | ||
|
|
||
| Typical requirements for this scenario: | ||
|
|
||
| * Both clusters run Couchbase Server 8.5 release or later. | ||
| * Both clusters have CNG version 1.2.1 or later installed. | ||
| * Remote references are created using the `couchbase2://` scheme and the hostname of the target Cloud Native Gateway. | ||
| * Remote references are configured with full TLS encryption (`secureType=full`). | ||
| * The clusters do not require alternate addresses or direct node-to-node network connectivity. | ||
|
|
||
| === OpenShift Environment | ||
|
|
||
| With Cloud Native Gateway (CNG), instead of a custom solution to expose all of the cluster's nodes externally, you can use the standard approaches for exposing cluster services like OpenShift Routes and Kubernetes LoadBalancer and only expose the CNG service outside of the k8s environment. | ||
| For more information, see xref:cloud-native-gateway::intro/about-cng.adoc[About Cloud Native Gateway]. | ||
|
|
||
| In an OpenShift deployment managed by the Couchbase Autonomous Operator (CAO), CNG is deployed as a sidecar to each Couchbase Server node. | ||
| Administrators define OpenShift routes that expose the CNG service to external clients. | ||
| XDCR from any Couchbase cluster can replicate into the OpenShift-hosted cluster by creating a remote reference with the `couchbase2://` scheme and the route address. | ||
|
|
||
| NOTE: CAO manages the installation and lifecycle of CNG in Kubernetes and OpenShift environments. | ||
| When creating XDCR remote references in a CAO-managed cluster, the `couchbase2://` scheme and CNG address should be allowed in the CAO XDCR configuration. | ||
|
|
||
| === Capella to Self-Managed Over Public Network | ||
|
|
||
| A Capella cluster running Couchbase Server 8.5 can replicate data to a self-managed cluster using Cloud Native Gateway across the public network or private network using VPC Peering. | ||
| To use this scenario: | ||
|
|
||
| * The self-managed target cluster must have CNG installed and enabled. | ||
| * The self-managed CNG must allow connections from the Capella cluster nodes. | ||
| * On the Capella cluster, create a remote reference using the `couchbase2://` prefix and the self-managed cluster CNG hostname. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.