{"id":9643,"date":"2021-08-18T00:00:29","date_gmt":"2021-08-18T07:00:29","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=9643"},"modified":"2025-06-13T20:46:00","modified_gmt":"2025-06-14T03:46:00","slug":"xdcr-architecture-replicating-with-collections","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/","title":{"rendered":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0"},"content":{"rendered":"<p><strong><a href=\"https:\/\/www.couchbase.com\/products\/xdcr\/\">Cross Data Center Replication (XDCR)<\/a> is a database essential.<\/strong><\/p>\n<p>XDCR ensures database High Availability (HA), disaster recovery, and geo-locality. With <a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-server-7-0-release\/?ref=blog\" target=\"_blank\" rel=\"noopener\">the Couchbase Server 7.0 release<\/a>, <a href=\"https:\/\/www.couchbase.com\/products\/xdcr\/\">XDCR<\/a> also supports new <a href=\"https:\/\/www.couchbase.com\/blog\/scopes-and-collections-for-modern-multi-tenant-applications-couchbase-7-0\/?ref=blog\" target=\"_blank\" rel=\"noopener\">individual namespaces called Scopes and Collections<\/a> within each database Bucket. Support for Scopes and Collections includes major architectural improvements for Cross Data Center Replication as well.<\/p>\n<p>With Scopes and Collections, you can now use XDCR for data replication for specific microservices or tenant-specific data replication for multi-tenant applications. This article introduces a new Collections replication management feature and describes a behind-the-scenes XDCR architectural improvement.<\/p>\n<p>These improvements to XDCR enable a whole new dimension of replication use cases. XDCR positions <a href=\"https:\/\/www.couchbase.com\/products\/server\/?ref=blog\" target=\"_blank\" rel=\"noopener\">Couchbase Server<\/a> 7.0 to support many more microservices or multi-tenant application use cases both today and into the future.<\/p>\n<p>Before we dive into specifics, here is some important background reading if you&#8217;re not familiar with Cross Data Center Replication or related features:<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>A quick refresher on <a href=\"https:\/\/www.couchbase.com\/blog\/understanding-xdcr-part-1\/?ref=blog\" target=\"_blank\" rel=\"noopener\">XDCR architecture basics<\/a><\/li>\n<li>A deep dive into <a href=\"https:\/\/www.couchbase.com\/blog\/advanced-filtering-with-xdcr-6-5\/?ref=blog\" target=\"_blank\" rel=\"noopener\">XDCR Advanced Filtering<\/a> which I&#8217;ll touch on below<\/li>\n<li>An informative article on <a href=\"https:\/\/www.couchbase.com\/blog\/exercising-control-on-quality-of-service-using-xdcr\/?ref=blog\" target=\"_blank\" rel=\"noopener\">XDCR Replication Priority<\/a> \u2013 a 6.5 feature that I&#8217;ll mention briefly below<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Okay, let&#8217;s dive in.<\/p>\n<h2>Mapping Data Replication between Scopes &amp; Collections for XDCR<\/h2>\n<p>If you only have a single cluster, managing Scopes and Collections is relatively straightforward. However, since XDCR involves multidimensional scaling, mapping and managing these new namespaces becomes more complex.<\/p>\n<p>A single unique replication can still exist between a source and a target Bucket. This requirement isn\u2019t changing.<\/p>\n<p>But with the introduction of Scopes and Collections, there are two types of mappings to support<br \/>\nmanaging Collections within a Bucket-to-Bucket replication. These two types are <strong>implicit mapping<\/strong> and <strong>explicit mapping<\/strong>.<\/p>\n<p>A mapping is a link between two namespaces of the same level, and it exists in the context of a Bucket-to-Bucket replication. A mapping can be between Scopes, or it can be between Collections.<\/p>\n<p>Each Bucket-to-Bucket replication uses either implicit or explicit mapping to perform replication between source and target Collections. Replications use implicit mapping unless otherwise explicitly (pun intended) specified.<\/p>\n<h3>Implicit Mapping between Collections<\/h3>\n<p>Implicit mapping is the concept that a linkage should be established if the same named namespace exists in both the source and target Buckets.<\/p>\n<p>If both the source and target Bucket contain <em>identically<\/em> named Scopes and\/or Collections, then they are implicitly mapped. For example, under implicit mapping, if a source Bucket contains a namespace `Scope1.Collection1`, then replication will take place if the target Bucket also contains `Scope1.Collection1`.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9644\" style=\"width: 970px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9644\" class=\"size-full wp-image-9644\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/Implicit-mapping.png\" alt=\"Implicit mapping for cross data center replication (XDCR) between two Buckets in Couchbase\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Implicit-mapping.png 960w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Implicit-mapping-300x169.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Implicit-mapping-768x432.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Implicit-mapping-20x11.png 20w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-9644\" class=\"wp-caption-text\">Figure 1: Cross Data Center Replication (XDCR) between two Buckets given implicit mapping<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>Figure 1 above shows a Bucket-to-Bucket replication using implicit mapping. Note that source default Collections and target default Collections are mapped together (not shown in the figure).<\/p>\n<p>Any unmapped namespaces will <strong>not<\/strong> be replicated. If the unmapped namespaces are created later, then XDCR catches up on missing data using a backfill replication. (I will explain the backfill pipeline in a later section.)<\/p>\n<h3>Explicit Mapping between Collections<\/h3>\n<p>For you need more granular control over your data replication, you should try explicit mapping.<\/p>\n<p>Explicit mapping requires users to <strong>explicitly<\/strong> define namespace relationships. Mapping a Scope to another Scope means all Collections within that Scope are implicitly mapped. However, mapping one Collection to another Collection does not affect any other namespaces.<\/p>\n<p>Explicit mapping is accomplished via the use of <strong>mapping rules<\/strong> via the command-line interface (CLI). The XDCR Console UI provides an abstraction so you don&#8217;t have to enter mapping rules manually.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9646\" style=\"width: 910px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9646\" class=\"size-large wp-image-9646\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/explicitMappingUI-1024x583.png\" alt=\"Cross Data Center Replication (XDCR) user interface for explicit mapping rules\" width=\"900\" height=\"512\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-1024x583.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-300x171.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-768x438.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-1536x875.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-2048x1167.png 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-20x11.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/explicitMappingUI-1320x752.png 1320w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><p id=\"caption-attachment-9646\" class=\"wp-caption-text\">Figure 3: XDCR UI provides an easy-to-use experience for setting up explicit mapping and hides the need to manually enter mapping rules<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>The Couchbase Server documentation includes <a href=\"https:\/\/docs.couchbase.com\/server\/current\/learn\/clusters-and-availability\/xdcr-with-scopes-and-collections.html?ref=blog#rules-for-explicit-mappings\" target=\"_blank\" rel=\"noopener\">a detailed explanation of the mapping rules and how to use them<\/a>. Mapping rules programmatically tell XDCR how to match the namespaces by name.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9645\" style=\"width: 970px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9645\" class=\"size-full wp-image-9645\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/Explicit-mapping.png\" alt=\"Explicit mapping between two Buckets in Couchbase using Cross Data Center Replication (XDCR)\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Explicit-mapping.png 960w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Explicit-mapping-300x169.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Explicit-mapping-768x432.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/Explicit-mapping-20x11.png 20w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-9645\" class=\"wp-caption-text\">Figure 2: Replication between two Buckets using explicit mapping with two rules specified: a Scope-to-Scope mapping rule and a Collection-to-Collection mapping rule<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>Explicit mapping rules give you a new level of flexibility in mapping Collections. You can also change the rules on the fly. XDCR takes any new rules and then intelligently ensures that all data is replicated. We&#8217;ll<\/p>\n<h4>Using Migration Mode to Migrate to Collections<\/h4>\n<p>When you upgrade to Couchbase Server 7.0, all of your data resides in the (new) default Collection within your existing Bucket(s).<\/p>\n<p>Using <strong>migration mode<\/strong> in Cross Data Center Replication (XDCR), you can migrate data to individual Collections on a target Bucket <em>without any application downtime<\/em>. Migration mode is a specialized version of the explicit mapping. It utilizes the XDCR Advanced Filtering engine to perform stream-based filtering as documents are being streamed from the source Bucket. Depending on the migration rules you specify, the document is then replicated to the specified target Collection.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9647\" style=\"width: 970px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9647\" class=\"size-full wp-image-9647\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/migration-mode.png\" alt=\"Migration mode too route documents for data replication in Couchbase\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/migration-mode.png 960w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/migration-mode-300x169.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/migration-mode-768x432.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/migration-mode-20x11.png 20w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-9647\" class=\"wp-caption-text\">Figure 4: Migration mode using different migration rules to route documents to their respective locations<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>Couchbase Server documentation has <a href=\"https:\/\/docs.couchbase.com\/server\/current\/rest-api\/rest-xdcr-create-replication.html?ref=blog#migration-mode\" target=\"_blank\" rel=\"noopener\">more details and examples covering migration mode<\/a>.<\/p>\n<h2>Behind the Scenes of XDCR with Scopes &amp; Collections<\/h2>\n<h3>Main Pipeline<\/h3>\n<p>When a replication is created, it is translated into a <strong>replication specification<\/strong> and stored internally. XDCR then reads the replication spec (and its settings) and creates a <strong>pipeline<\/strong> that requests data from the source Bucket. The pipeline faithfully replicates each document to the target Bucket (barring any Advanced Filtering in place).<\/p>\n<p>The above process remains the same in Couchbase Server 7.0. So if one of your source Buckets contains multiple source Collections, XDCR requests them all. This behavior is called a <strong>main pipeline<\/strong>. The main pipeline replicates a source document to the target using implicit or explicit mapping. If the target cluster does not contain the mapped namespace, XDCR drops the document \u201con the floor\u201d. It then continues to replicate the next mutation.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9648\" style=\"width: 970px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9648\" class=\"size-full wp-image-9648\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/main-pipeline.png\" alt=\"Data replication for all documents in Couchbase\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/main-pipeline.png 960w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/main-pipeline-300x169.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/main-pipeline-768x432.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/main-pipeline-20x11.png 20w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-9648\" class=\"wp-caption-text\">Figure 5: Replicating all documents from source Bucket with a missing target Collection<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>During replication, XDCR continuously watches for new or removed target Collections. When XDCR detects a new target Collection, it checks if a new mapping can be established. If a new mapping is possible, then the main pipeline successfully replicates the data to the target namespace.<\/p>\n<p>It\u2019s important to understand that a replication stream is sequential. If XDCR previously dropped a document, a sequence stream cannot &#8220;rewind&#8221; to an earlier point for the missed document. XDCR needs to replicate any missed mutations; otherwise, there will be missing data.<\/p>\n<p><em>One side note: This inability to rewind (without Collections) is exactly why there is an option called \u201cSave and Restart Replication\u201d when editing the Advanced Filtering Expression in Couchbase Server 6.5. When you use \u201cSave and Restart Replication\u201d, the pipeline starts over and streams from sequence 0 to ensure that all documents are replicated. This solution won\u2019t work for Collections.<\/em><\/p>\n<h3>Backfill Pipeline<\/h3>\n<p>In Couchbase Server 7.0, XDCR now includes the concept of a backfill pipeline.<\/p>\n<p>The backfill pipeline&#8217;s purpose is to stream data that the main pipeline dropped earlier. This approach ensures that all the data from a namespace is replicated.<\/p>\n<p>When a new target Collection is detected, XDCR automatically creates a backfill pipeline and streams the missing data. In the meantime, the main pipeline remains responsible for streaming any ongoing mutations to the new target Collection.<\/p>\n<p>The backfill pipelines always start in low-priority mode to minimize the performance impact on the main pipelines. Once the backfill pipeline has finished streaming missing data \u2013 based on a definite end sequence number \u2013 then the backfill pipeline is automatically torn down.<\/p>\n<p>The whole backfill replication construction and teardown process is completely automated, so it happens behind the scenes without alerting users. However, it&#8217;s important that you understand the architecture since your users might notice that some documents created later in time on the source Buckets arrive prior to the earlier mutations.<\/p>\n<p>Figure 6 below illustrates how the backfill replication pipeline works.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<div id=\"attachment_9649\" style=\"width: 970px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9649\" class=\"size-full wp-image-9649\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/11\/backfill-pipeline.png\" alt=\"Backfill pipeline streaming data replication in Couchbase\" width=\"960\" height=\"540\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/backfill-pipeline.png 960w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/backfill-pipeline-300x169.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/backfill-pipeline-768x432.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/backfill-pipeline-20x11.png 20w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><p id=\"caption-attachment-9649\" class=\"wp-caption-text\">Figure 6: Backfill Pipeline streaming data for `collectionB` only for previously missed sequence numbers<\/p><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>In the above diagram, a new `collectionB` was created on the target Bucket. XDCR on Cluster A detected the new Collection when its main pipeline was streaming out mutations at sequence number 200. It then created a backfill pipeline, which is responsible for `collectionB` mutations from sequence number 0 to 200. All ongoing `collectionB` mutations (201+) will go through the main pipeline.<\/p>\n<p>In summary, the main pipeline enables XDCR to continue to replicate the latest mutations continuously; the backfill pipeline allows a lower priority replication stream to replicate any previously missed data.<\/p>\n<h2>Conclusion<\/h2>\n<p>In summary, XDCR Collections Replication intelligently monitors both source and target Collections management changes. It can replicate either dynamically (via implicit mapping) or programmatically (via explicit mapping). XDCR Collections allows you to dynamically change modes between implicit and explicit mapping, as well as to modify explicit mapping rules on the fly without the need to restart replication from sequence 0.<\/p>\n<p>Scopes and Collections in Couchbase Server 7.0 open up a whole new world of use cases for Couchbase users and customers. With XDCR\u2019s support of Scopes and Collections \u2013 and the flexibility it provides \u2013 Couchbase Server addresses even more customer needs than any previous releases.<\/p>\n<div class=\"wp-block-spacer\" style=\"height: 30px\" aria-hidden=\"true\"><\/div>\n<div style=\"text-align: center\"><strong>Ready to try out XDCR for yourself?<\/strong><\/div>\n<div style=\"text-align: center\"><strong><a href=\"https:\/\/www.couchbase.com\/downloads\/?ref=blog\" target=\"_blank\" rel=\"noopener\">Download Couchbase 7 today<\/a><\/strong><\/div>\n<div class=\"wp-block-spacer\" style=\"height: 15px\" aria-hidden=\"true\"><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cross Data Center Replication (XDCR) is a database essential. XDCR ensures database High Availability (HA), disaster recovery, and geo-locality. With the Couchbase Server 7.0 release, XDCR also supports new individual namespaces called Scopes and Collections within each database Bucket. Support [&hellip;]<\/p>\n","protected":false},"author":69696,"featured_media":11731,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1821,1816,9415,9336],"tags":[1952,2127,2126,2103,1446],"ppma_author":[9119],"class_list":["post-9643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-architecture","category-couchbase-server","category-xdcr","category-scopes-and-collections","tag-data-replication","tag-disaster-recovery","tag-high-availability","tag-microservices","tag-multidimensional-scaling"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.7.1 (Yoast SEO v25.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0<\/title>\n<meta name=\"description\" content=\"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0\" \/>\n<meta property=\"og:description\" content=\"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-18T07:00:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T03:46:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0-social.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"418\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Neil Huang, Senior Software Engineer, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0-social.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Neil Huang, Senior Software Engineer, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\"},\"author\":{\"name\":\"Neil Huang, Principal Software Engineer, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/af0dd16f7a6663fcaf0746618bdbc8f8\"},\"headline\":\"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0\",\"datePublished\":\"2021-08-18T07:00:29+00:00\",\"dateModified\":\"2025-06-14T03:46:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\"},\"wordCount\":1543,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png\",\"keywords\":[\"Data Replication\",\"Disaster Recovery\",\"High Availability\",\"microservices\",\"Multidimensional Scaling\"],\"articleSection\":[\"Couchbase Architecture\",\"Couchbase Server\",\"Cross Data Center Replication (XDCR)\",\"Scopes and Collections\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\",\"name\":\"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png\",\"datePublished\":\"2021-08-18T07:00:29+00:00\",\"dateModified\":\"2025-06-14T03:46:00+00:00\",\"description\":\"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png\",\"width\":1200,\"height\":628,\"caption\":\"Learn how XDCR now supports replication between Scopes and Collections in Couchbase Server 7.0\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/af0dd16f7a6663fcaf0746618bdbc8f8\",\"name\":\"Neil Huang, Principal Software Engineer, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4658437f7d44d54dc499becf92006d00\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e1b016e86d1634bc3c1fd4abaaee131dbfe65716f8e02411462878ce5a24709c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e1b016e86d1634bc3c1fd4abaaee131dbfe65716f8e02411462878ce5a24709c?s=96&d=mm&r=g\",\"caption\":\"Neil Huang, Principal Software Engineer, Couchbase\"},\"description\":\"Neil Huang is a Principal Software Engineer at Couchbase, and is a developer for cross datacenter replication (XDCR). Neil has more than 10 years of experience working in enterprise software. Prior to Couchbase, he was a member of the data stack software team for Enterprise Data Storage, HPE-3PAR, as well as a data storage startup building a next-generation distributed data platform. Neil received both his bachelor\u2019s degree in electrical engineering\/computer engineering and master\u2019s degree in computer network engineering from UCLA.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/neilhuang\/\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/neil_huang\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0","description":"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/","og_locale":"en_US","og_type":"article","og_title":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0","og_description":"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.","og_url":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/","og_site_name":"The Couchbase Blog","article_published_time":"2021-08-18T07:00:29+00:00","article_modified_time":"2025-06-14T03:46:00+00:00","og_image":[{"width":800,"height":418,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0-social.png","type":"image\/png"}],"author":"Neil Huang, Senior Software Engineer, Couchbase","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0-social.png","twitter_misc":{"Written by":"Neil Huang, Senior Software Engineer, Couchbase","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/"},"author":{"name":"Neil Huang, Principal Software Engineer, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/af0dd16f7a6663fcaf0746618bdbc8f8"},"headline":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0","datePublished":"2021-08-18T07:00:29+00:00","dateModified":"2025-06-14T03:46:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/"},"wordCount":1543,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png","keywords":["Data Replication","Disaster Recovery","High Availability","microservices","Multidimensional Scaling"],"articleSection":["Couchbase Architecture","Couchbase Server","Cross Data Center Replication (XDCR)","Scopes and Collections"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/","url":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/","name":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png","datePublished":"2021-08-18T07:00:29+00:00","dateModified":"2025-06-14T03:46:00+00:00","description":"Learn how Cross Data Center Replication (XDCR) now supports data replication between Scopes and Collections in Couchbase Server 7.0 in two different ways.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/11\/cross-data-center-replication-xdcr-support-scopes-collections-couchbase-server-7-0.png","width":1200,"height":628,"caption":"Learn how XDCR now supports replication between Scopes and Collections in Couchbase Server 7.0"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/xdcr-architecture-replicating-with-collections\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introducing XDCR Support for Scopes &amp; Collections in Couchbase 7.0"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/af0dd16f7a6663fcaf0746618bdbc8f8","name":"Neil Huang, Principal Software Engineer, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4658437f7d44d54dc499becf92006d00","url":"https:\/\/secure.gravatar.com\/avatar\/e1b016e86d1634bc3c1fd4abaaee131dbfe65716f8e02411462878ce5a24709c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1b016e86d1634bc3c1fd4abaaee131dbfe65716f8e02411462878ce5a24709c?s=96&d=mm&r=g","caption":"Neil Huang, Principal Software Engineer, Couchbase"},"description":"Neil Huang is a Principal Software Engineer at Couchbase, and is a developer for cross datacenter replication (XDCR). Neil has more than 10 years of experience working in enterprise software. Prior to Couchbase, he was a member of the data stack software team for Enterprise Data Storage, HPE-3PAR, as well as a data storage startup building a next-generation distributed data platform. Neil received both his bachelor\u2019s degree in electrical engineering\/computer engineering and master\u2019s degree in computer network engineering from UCLA.","sameAs":["https:\/\/www.linkedin.com\/in\/neilhuang\/"],"url":"https:\/\/www.couchbase.com\/blog\/author\/neil_huang\/"}]}},"authors":[{"term_id":9119,"user_id":69696,"is_guest":0,"slug":"neil_huang","display_name":"Neil Huang, Senior Software Engineer, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/e1b016e86d1634bc3c1fd4abaaee131dbfe65716f8e02411462878ce5a24709c?s=96&d=mm&r=g","author_category":"","last_name":"Huang, Senior Software Engineer, Couchbase","first_name":"Neil","job_title":"","user_url":"","description":"Neil Huang is a Senior Software Engineer at Couchbase, and is a developer for cross datacenter replication (XDCR). Neil has more than 10 years of experience working in enterprise software. Prior to Couchbase, he was a member of the data stack software team for Enterprise Data Storage, HPE-3PAR, as well as a data storage startup building a next-generation distributed data platform. Neil received both his bachelor\u2019s degree in electrical engineering\/computer engineering and master\u2019s degree in computer network engineering from UCLA."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/9643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/69696"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=9643"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/9643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/11731"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=9643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=9643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=9643"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=9643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}