{"id":14201,"date":"2023-03-22T15:02:44","date_gmt":"2023-03-22T22:02:44","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=14201"},"modified":"2025-06-13T20:45:46","modified_gmt":"2025-06-14T03:45:46","slug":"couchbase-replication-and-sync","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/","title":{"rendered":"Data Replication and Synchronization in Couchbase"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Data replication and synchronization may seem redundant at first glance. They both refer to copying data from one persistent repository to another for consistency in a distributed architecture. But for Couchbase, each term has a different meaning and each is used for different purposes.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This post is an overview of Couchbase Cross Datacenter Replication (XDCR), which provides data replication between database clusters, and Couchbase Sync Gateway\/Capella App Services, which enables data synchronization for mobile, IoT and edge applications.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Cross Datacenter Replication (XDCR)<\/span><\/h2>\n<h3><span style=\"font-weight: 400\">XDCR Overview<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Couchbase&#8217;s <\/span><a href=\"https:\/\/docs.couchbase.com\/cloud\/clusters\/xdcr\/xdcr.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Cross Datacenter Replication (XDCR)<\/span><\/a><span style=\"font-weight: 400\"> enables the replication of data across clusters located in different datacenters. Inter-cluster replication is used to ensure even distribution and high availability of data. The protocol used for XDCR is called DCP (data change protocol). DCP is also used for inter-cluster replication and, in both cases, is used for low-latency memory-to-memory replication.<\/span><\/p>\n<p><span style=\"font-weight: 400\">XDCR is designed for global replication: replicating data between multiple regions, multiple datacenters, multiple cloud providers, or any combination. Multiple clusters are needed if you want to replicate data across different regions. Unlike other databases, Couchbase&#8217;s multi-datacenter functionality is not provided by stretching a single cluster across multiple datacenters. Due to high network latencies, nodes\/servers in different regions cannot be part of the same cluster. Each cluster is independent.<\/span><\/p>\n<p><span style=\"font-weight: 400\">XDCR can be very simple to start with, but many powerful features and options are available. It supports unidirectional and bidirectional operation and active-active replication with automatic conflict resolution. Use filtered replication for replicating subsets of documents.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">XDCR Nuts and Bolts<\/span><\/h3>\n<p><span style=\"font-weight: 400\">XDCR replicates data from a <\/span><i><span style=\"font-weight: 400\">source<\/span><\/i><span style=\"font-weight: 400\"> bucket to a <\/span><i><span style=\"font-weight: 400\">target<\/span><\/i><span style=\"font-weight: 400\"> bucket (XDCR also supports scope\/collection replication, both implicit and explicit). Replication is from memory to memory and asynchronous, and both existing and modified data are replicated.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Multiple data streams are shuffled across all shards (vBuckets) to move data in parallel to the destination cluster for additional latency reduction.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Source and destination clusters can have different numbers of servers (nodes), and XDCR is resilient to topology changes.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">XDCR Use cases<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Unidirectional (one-way) and bidirectional (two-way) configurations each have their own use cases.<\/span><\/p>\n<h4><span style=\"font-weight: 400\">Unidirectional Replication<\/span><\/h4>\n<p><span style=\"font-weight: 400\">One-way replication is great for:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><b>Disaster Recovery<\/b><span style=\"font-weight: 400\"> &#8211; Latest data is always available in the event of a disaster. This enables quick failover and recovery without loss of data or downtime.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Dev\/test copies<\/b><span style=\"font-weight: 400\"> &#8211; Provision copies of production data for testing and development purposes. This reduces the need for manual data copying and reduces the risk of errors or inconsistencies between the environments. XDCR provides near real-time replication, meaning that test data is always up-to-date with production data.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Reporting\/Archival<\/b><span style=\"font-weight: 400\"> &#8211; Replicating data to a dedicated reporting or archival cluster allows for efficient reporting and analysis without impacting the performance of the production environment. XDCR enables real-time or near real-time replication of data, so reporting or archival cluster is always up-to-date with the latest data. This makes it a solution for organizations that need to maintain historical data for compliance or analysis purposes.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span style=\"font-weight: 400\">Bidirectional Replication<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Two-way replication can be used for use cases such as:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><b>Multiple &#8220;hot&#8221; active clusters &#8211;<\/b><span style=\"font-weight: 400\"> By replicating data across multiple datacenters, XDCR can help provide efficient load balancing and high data availability. XDCR enables real-time or near-real-time data replication, ensuring all active clusters are always in sync. Suitable for organizations that need to serve large volumes of traffic or have a globally distributed user base.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Data locality &#8211;<\/b><span style=\"font-weight: 400\"> With XDCR, you can create geographically distributed clusters, allowing data to be stored closer to the users and reducing latency. XDCR can automatically replicate data across multiple datacenters, ensuring that data is always up-to-date at the nearest location.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Geofencing &#8211; <\/b><span style=\"font-weight: 400\">XDCR can be configured to replicate certain data only to specific clusters, ensuring that data is only available within designated geographic regions. This can be used by organizations that must comply with data privacy regulations or enforce geofencing restrictions on their data.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">XDCR Options<\/span><\/h3>\n<p><b>Conflict resolution<\/b><span style=\"font-weight: 400\"> resolves conflicts that arise when different nodes in the cluster attempt to update the same data simultaneously. Sequence-based conflict resolution resolves conflicts based on the order in which updates are received. In contrast, timestamp-based conflict resolution uses the timestamp of the updates to determine which update is more recent and should be applied. Depending on the specific use case, one type of conflict resolution may be more appropriate, and Couchbase&#8217;s XDCR allows for flexibility in choosing the appropriate method.<\/span><\/p>\n<p><b>Filtering<\/b><span style=\"font-weight: 400\"> allows users to specify which documents should be included or excluded from replication between clusters. This can be based on criteria such as document type, attribute values, or other metadata. XDCR filtering provides greater control over which documents are replicated, reducing the amount of unnecessary network traffic and storage overhead while improving replication efficiency and overall system performance.<\/span><\/p>\n<p><b>Document deletion<\/b><span style=\"font-weight: 400\"> in one cluster will trigger the deletion of the corresponding document in the other cluster. However, this behavior can be filtered, allowing organizations to maintain historical data for archival or reporting use cases. By filtering out document deletions, organizations can ensure that data remains available in their reporting or archival clusters, even if the corresponding documents have been deleted in the production cluster. This can help organizations comply with data retention policies and ensure that important data is always available for analysis and reporting.<\/span><\/p>\n<p><span style=\"font-weight: 400\">XDCR can also support migration scenarios, such as infrastructure-agnostic migration from on-prem to the cloud.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">XDCR Summary<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Couchbase&#8217;s XDCR feature is one of the primary features that first attracts Couchbase customers and users. It&#8217;s a simple and flexible tool for replicating data across different clusters located in different datacenters.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The following table lists the primary use cases for XDCR in a Couchbase Server or Couchbase Capella deployment:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center\"><b>XDCR<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Disaster recovery<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Dev\/Test Copies<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Reporting, auditing, archival<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Datacenter locality<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Geo-fencing<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Cloud data migration<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">See a live demo of <a href=\"https:\/\/youtu.be\/xVJz0AZQlbU\" target=\"_blank\" rel=\"noopener\">Couchbase XDCR in action<\/a>, below:<\/span><\/p>\n<p><iframe loading=\"lazy\" title=\"Couchbase Cross-Data-Center-Replication (XDCR) demo\" width=\"900\" height=\"506\" src=\"https:\/\/www.youtube.com\/embed\/xVJz0AZQlbU?feature=oembed&#038;enablejsapi=1&#038;origin=https:\/\/www.couchbase.com\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h2><span style=\"font-weight: 400\">Sync Gateway\/Capella App Services<\/span><\/h2>\n<h3><span style=\"font-weight: 400\">Overview of the Couchbase Mobile product stack<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To understand the role of synchronization in a Couchbase-powered application, we start by examining the <\/span><a href=\"https:\/\/www.couchbase.com\/products\/mobile\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Couchbase Mobile<\/span><\/a><span style=\"font-weight: 400\"> product stack. Couchbase Mobile is explicitly designed to enable offline first mobile and edge applications. The stack consists of the following:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/www.couchbase.com\/products\/server\/\" target=\"_blank\" rel=\"noopener\"><b>Couchbase Server<\/b><\/a><span style=\"font-weight: 400\"> &#8211; our flagship modern database server with SQL, analytics, FTS and eventing support.<\/span><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/www.couchbase.com\/products\/lite\/\" target=\"_blank\" rel=\"noopener\"><b>Couchbase Lite<\/b><\/a><span style=\"font-weight: 400\"> &#8211; the embeddable version of Couchbase for mobile and custom embedded devices.<\/span><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/www.couchbase.com\/products\/sync-gateway\/\" target=\"_blank\" rel=\"noopener\"><b>Sync Gateway<\/b><\/a><span style=\"font-weight: 400\"> &#8211; sits between the cloud and edge databases and is responsible for secure data sync, routing and access control between mobile clients and server tiers.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">These capabilities can be deployed in two ways:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Fully managed with <\/span><a href=\"https:\/\/www.couchbase.com\/products\/capella\/\" target=\"_blank\" rel=\"noopener\"><b>Couchbase Capella<\/b><\/a><span style=\"font-weight: 400\">, the database-as-a-service hosted by Couchbase.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Self-managed, where you install and manage the Couchbase Mobile products yourself on public or private clouds, on a cloud edge service or on-prem.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div id=\"attachment_14202\" style=\"width: 910px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14202\" class=\"wp-image-14202 size-large\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/couchbase-capella-sync-options-1024x497.png\" alt=\"\" width=\"900\" height=\"437\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options-1024x497.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options-300x146.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options-768x373.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options-1536x745.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options-1320x640.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-capella-sync-options.png 1754w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><p id=\"caption-attachment-14202\" class=\"wp-caption-text\">The Couchbase Mobile product stack<\/p><\/div>\n<h3><span style=\"font-weight: 400\">About Sync Gateway<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Sync Gateway is built specifically for synchronizing data and providing authorization and authentication for large-scale mobile and IoT applications.<\/span><\/p>\n<p><span style=\"font-weight: 400\">It is designed, first and foremost, to provide cloud-to-edge data sync. This is the ability to synchronize data using a WebSockets protocol between Couchbase in the cloud and devices running Couchbase Lite and between individual Sync Gateway deployments &#8211; including between Sync Gateway and App Services.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sync Gateway also provides:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">REST APIs that allow web clients to access sync data.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Administrative APIs for remotely working with deployment configurations.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Monitoring performance and event statistics.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">Cloud to edge data sync<\/span><\/h3>\n<h4><span style=\"font-weight: 400\">Sync with Couchbase Lite<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Syncing between Couchbase Server\/Capella and Couchbase Lite is bi-directional and initiated by the edge device in a push or pull manner. Replication can be one-time, continuous, or performed on demand, supporting many conditions and use cases.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The sync payload is JSON data or binary attachments. In the case of binary\/blob attachments, payloads <\/span><i><span style=\"font-weight: 400\">under <\/span><\/i><span style=\"font-weight: 400\">20MB are replicated. If the blob is <\/span><i><span style=\"font-weight: 400\">over <\/span><\/i><span style=\"font-weight: 400\">20MB, the document itself is replicated but not the blob.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Couchbase Lite allows applications to leverage fine-grained filters on the replicator to determine what documents are synced and where to route them. This controls when and what documents get synced.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Replications are sent using WebSockets to enable full-duplex messaging between remote hosts over a single TCP connection. Hence, it is a faster protocol, reducing bandwidth use and socket resources compared to REST-based protocols over HTTP.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sync Gateway\/App Services is responsible for maintaining appropriate consistency for these replications.<\/span><\/p>\n<div id=\"attachment_14203\" style=\"width: 487px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14203\" class=\"wp-image-14203\" style=\"background-color: initial\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/couchbase-mobile-server-sync-806x1024.png\" alt=\"\" width=\"477\" height=\"606\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-806x1024.png 806w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-236x300.png 236w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-768x976.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-1209x1536.png 1209w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-300x381.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync-1320x1677.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-server-sync.png 1573w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><p id=\"caption-attachment-14203\" class=\"wp-caption-text\">Couchbase Lite embedded clients syncing with Couchbase in the cloud<\/p><\/div>\n<h4><span style=\"font-weight: 400\">Inter-Sync Gateway Replication<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Along with synchronizing data directly from Couchbase Lite to Couchbase Server or Capella, Sync Gateway can replicate to other Sync Gateway instances and\/or Capella App Services using a feature called Inter-Sync Gateway Replication.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Like Couchbase Lite sync, Inter-Sync Gateway Replications are bidirectional and based on WebSockets.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inter-Sync Gateway Replications automatically attempt to restart in case of interruption or whenever a node restarts and can be configured to decrease restart attempts in cases of an extended network interruption.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inter-Sync Gateway Replication provides built-in high availability and uses node distribution to ensure all running replications are uniformly distributed across the available nodes, regardless of the originating node.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The ability to sync data between Sync Gateway deployments allows you to architect multi-tiered, hierarchical, edge topologies that support extremely high availability, low latency, data privacy and efficient bandwidth usage.\u00a0<\/span><\/p>\n<div id=\"attachment_14204\" style=\"width: 488px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14204\" class=\" wp-image-14204\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/inter-sync-gateway-replication-816x1024.png\" alt=\"\" width=\"478\" height=\"600\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-816x1024.png 816w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-239x300.png 239w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-768x964.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-1224x1536.png 1224w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-300x376.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication-1320x1656.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/inter-sync-gateway-replication.png 1593w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><p id=\"caption-attachment-14204\" class=\"wp-caption-text\">Couchbase Sync Gateway at the edge syncing with Sync Gateway\/App Services in the cloud<\/p><\/div>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><span style=\"font-weight: 400\">For more information about using <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/data-sync-capella-app-services-and-mobile\/\"><span style=\"font-weight: 400\">Inter-Sync Gateway Replication with App Services, check out this blog<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span style=\"font-weight: 400\">Delta Sync<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Sync Gateway \/ App Services can track and replicate the parts of a document that have changed without sending the entire document. This allows less data to be sent over bandwidth constrained networks, making apps faster and more efficient.<\/span><\/p>\n<div id=\"attachment_14206\" style=\"width: 533px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14206\" class=\" wp-image-14206\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/couchbase-mobile-delta-sync-807x1024.png\" alt=\"\" width=\"523\" height=\"664\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-807x1024.png 807w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-237x300.png 237w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-768x974.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-1211x1536.png 1211w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-300x381.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync-1320x1674.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-mobile-delta-sync.png 1576w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><p id=\"caption-attachment-14206\" class=\"wp-caption-text\">Delta Sync only syncs changed data, not the full document<\/p><\/div>\n<h4><span style=\"font-weight: 400\">Conflict Resolution<\/span><\/h4>\n<p><span style=\"font-weight: 400\">For mobile apps that utilize decentralized data writes, the same data can be simultaneously modified on multiple devices, creating a conflict. For resolving conflicts, you can apply one of the built-in conflict resolver policies, which can be easily included in your own replications. The goal of automatic conflict resolution is to return a winning revision based on the consistent application of the configured conflict resolver policy.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Sync Gateway\/App Services conflict resolution uses revision trees and a default resolution rule of <\/span><i><span style=\"font-weight: 400\">most active branch wins<\/span><\/i><span style=\"font-weight: 400\">. This way conflicts are resolved logically based on activity, vs. system clock-based conflict resolution that takes a <\/span><i><span style=\"font-weight: 400\">most recent change wins<\/span><\/i><span style=\"font-weight: 400\"> approach, which are problematic due to the issues around clock differences across devices.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><span style=\"font-weight: 400\">Read more about working with <a href=\"https:\/\/docs.couchbase.com\/couchbase-lite\/current\/android\/conflict.html\" target=\"_blank\" rel=\"noopener\">Couchbase Lite conflict resolution<\/a><\/span><span style=\"font-weight: 400\"> and how to use <\/span><a href=\"https:\/\/docs.couchbase.com\/sync-gateway\/current\/sync-inter-syncgateway-conflict-resolution.html\"><span style=\"font-weight: 400\">Inter-Sync Gateway Replication conflict resolution<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">Access Control<\/span><\/h3>\n<h4><span style=\"font-weight: 400\">Model<\/span><\/h4>\n<p><span style=\"font-weight: 400\">Channels are a key to understanding how Sync Gateway shares and controls access to documents. Channels are basically intermediaries between documents and users.<\/span><\/p>\n<p><span style=\"font-weight: 400\">As illustrated in the following diagram, every document in the database belongs to a set<\/span><\/p>\n<p><span style=\"font-weight: 400\">of channels, and every user is allowed to access a set of channels.<\/span><\/p>\n<div id=\"attachment_14205\" style=\"width: 471px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14205\" class=\" wp-image-14205\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/couchbase-sync-access-control-714x1024.png\" alt=\"\" width=\"461\" height=\"661\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-714x1024.png 714w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-209x300.png 209w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-768x1102.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-1070x1536.png 1070w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-300x431.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control-1320x1894.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-access-control.png 1393w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><p id=\"caption-attachment-14205\" class=\"wp-caption-text\">Document access model<\/p><\/div>\n<p><span style=\"font-weight: 400\">Once a user creates a document, it is assigned to one or more channels. Users can only access documents assigned to channels that they have been granted access for, authorization is handled by Sync Gateway.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For example, documents added to a public channel are visible to any user. A channel can also be private and restrict access to a single user or provide shared access between multiple users,\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Roles are named collections of channels. A user is assigned to a role and thus inherits the channel access assigned to the role. This control can be changed at any time and even revoked to prevent improper access.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><span style=\"font-weight: 400\">Learn more about <a href=\"https:\/\/docs.couchbase.com\/sync-gateway\/current\/access-control-concepts.html\" target=\"_blank\" rel=\"noopener\">Sync Gateway Access Control<\/a><\/span><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4><span style=\"font-weight: 400\">Sync Function<\/span><\/h4>\n<p><span style=\"font-weight: 400\">The <\/span><i><span style=\"font-weight: 400\">sync <\/span><\/i><span style=\"font-weight: 400\">function is a JavaScript function that is called every time a new revision or update is made to a document.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The sync function can be used to:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Validate documents\u2009<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Authorize changes\u2009<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Grant user access to channels\u2009<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Assign documents to channels<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The sync function can provide access control at the document level for reads, and at the field level for writes.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Learn more about <a href=\"https:\/\/docs.couchbase.com\/sync-gateway\/current\/sync-function.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">the Sync Gateway Sync Function<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">Sync Gateway\/Capella App Services Summary<\/span><\/h3>\n<p><span style=\"font-weight: 400\">The data sync capabilities of Couchbase Sync Gateway and Capella App Services are ideally suited for mobile and IoT applications &#8211; where data changes rapidly and updates need to be instantly reflected across a distributed ecosystem of users and devices.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The following table provides an at-a-glance list of applicable use cases, if your application requires any of these capabilities, then Sync Gateway\/App Services is the solution:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center\"><b>Sync Gateway \/ App Services<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Cloud-to-edge data sync<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Built for multi-tier edge topologies<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Authentication, authorization<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Precise data routing<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Customizable conflict resolution<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Channel access revocation<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Check out this live demo of <a href=\"https:\/\/youtu.be\/xoIqt7C4R58\"><span style=\"font-weight: 400\">Couchbase Sync Gateway<\/span><\/a> in an airline baggage scenario:<\/p>\n<p><iframe loading=\"lazy\" title=\"Couchbase Data Synchronization Demo - Airline Baggage Scenario\" width=\"900\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/xoIqt7C4R58?feature=oembed&#038;enablejsapi=1&#038;origin=https:\/\/www.couchbase.com\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h2><span style=\"font-weight: 400\">Conclusion<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Couchbase is unmatched in its ability to replicate and synchronize data across a globally <a href=\"https:\/\/www.couchbase.com\/blog\/distributed-applications\/\">distributed application<\/a> ecosystem to provide consistency, integrity and disaster recovery for critical applications, from the cloud to the edge.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">We hope this post clarifies the role and uses of Couchbase XDCR and Couchbase Sync Gateway\/Capella App Services so know which one to leverage for your specific requirements.<\/span><\/p>\n<p style=\"text-align: center\"><a href=\"https:\/\/cloud.couchbase.com\/sign-up\"><span style=\"font-weight: 400\">Try Couchbase Capella FREE<\/span><\/a><\/p>\n<p><a href=\"https:\/\/cloud.couchbase.com\/sign-up\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14207\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/03\/image_2023-03-22_141115799.png\" alt=\"\" width=\"1000\" height=\"789\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/image_2023-03-22_141115799.png 1000w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/image_2023-03-22_141115799-300x237.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/image_2023-03-22_141115799-768x606.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data replication and synchronization may seem redundant at first glance. They both refer to copying data from one persistent repository to another for consistency in a distributed architecture. But for Couchbase, each term has a different meaning and each is [&hellip;]<\/p>\n","protected":false},"author":82066,"featured_media":14209,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2225,1810,1816,9415,2366],"tags":[],"ppma_author":[9657],"class_list":["post-14201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-couchbase-mobile","category-couchbase-server","category-xdcr","category-sync-gateway"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Data Center Replication and Synchronization | Couchbase<\/title>\n<meta name=\"description\" content=\"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.\" \/>\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\/couchbase-replication-and-sync\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Data Replication and Synchronization in Couchbase\" \/>\n<meta property=\"og:description\" content=\"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-22T22:02:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T03:45:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Couchbase Product Marketing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Couchbase Product Marketing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\"},\"author\":{\"name\":\"Couchbase Product Marketing\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/befa2a9de827aed2f8354f939cd6598e\"},\"headline\":\"Data Replication and Synchronization in Couchbase\",\"datePublished\":\"2023-03-22T22:02:44+00:00\",\"dateModified\":\"2025-06-14T03:45:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\"},\"wordCount\":2217,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png\",\"articleSection\":[\"Couchbase Capella\",\"Couchbase Mobile\",\"Couchbase Server\",\"Cross Data Center Replication (XDCR)\",\"Sync Gateway\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\",\"name\":\"Data Center Replication and Synchronization | Couchbase\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png\",\"datePublished\":\"2023-03-22T22:02:44+00:00\",\"dateModified\":\"2025-06-14T03:45:46+00:00\",\"description\":\"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png\",\"width\":1200,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Replication and Synchronization in Couchbase\"}]},{\"@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\/befa2a9de827aed2f8354f939cd6598e\",\"name\":\"Couchbase Product Marketing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/5112ed57023bd2807ae7086c2fe68752\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4760a19fc4ed6b8b830ba98f0869ed0d8ee6729e2593881e1a68032b9c281d5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4760a19fc4ed6b8b830ba98f0869ed0d8ee6729e2593881e1a68032b9c281d5d?s=96&d=mm&r=g\",\"caption\":\"Couchbase Product Marketing\"},\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/couchbase-pmm\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Data Center Replication and Synchronization | Couchbase","description":"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.","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\/couchbase-replication-and-sync\/","og_locale":"en_US","og_type":"article","og_title":"Data Replication and Synchronization in Couchbase","og_description":"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.","og_url":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/","og_site_name":"The Couchbase Blog","article_published_time":"2023-03-22T22:02:44+00:00","article_modified_time":"2025-06-14T03:45:46+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png","type":"image\/png"}],"author":"Couchbase Product Marketing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Couchbase Product Marketing","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/"},"author":{"name":"Couchbase Product Marketing","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/befa2a9de827aed2f8354f939cd6598e"},"headline":"Data Replication and Synchronization in Couchbase","datePublished":"2023-03-22T22:02:44+00:00","dateModified":"2025-06-14T03:45:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/"},"wordCount":2217,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png","articleSection":["Couchbase Capella","Couchbase Mobile","Couchbase Server","Cross Data Center Replication (XDCR)","Sync Gateway"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/","name":"Data Center Replication and Synchronization | Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png","datePublished":"2023-03-22T22:02:44+00:00","dateModified":"2025-06-14T03:45:46+00:00","description":"Overview of Couchbase Cross Datacenter Replication (XDCR) and Couchbase Sync Gateway\/Capella App synchronization for mobile, IoT and edge applications.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2023\/03\/couchbase-sync-and-replicate.png","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-replication-and-sync\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Data Replication and Synchronization in Couchbase"}]},{"@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\/befa2a9de827aed2f8354f939cd6598e","name":"Couchbase Product Marketing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/5112ed57023bd2807ae7086c2fe68752","url":"https:\/\/secure.gravatar.com\/avatar\/4760a19fc4ed6b8b830ba98f0869ed0d8ee6729e2593881e1a68032b9c281d5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4760a19fc4ed6b8b830ba98f0869ed0d8ee6729e2593881e1a68032b9c281d5d?s=96&d=mm&r=g","caption":"Couchbase Product Marketing"},"url":"https:\/\/www.couchbase.com\/blog\/author\/couchbase-pmm\/"}]}},"authors":[{"term_id":9657,"user_id":82066,"is_guest":0,"slug":"couchbase-pmm","display_name":"Couchbase Product Marketing","avatar_url":{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/06\/image_2022-06-17_105452255.png","url2x":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/06\/image_2022-06-17_105452255.png"},"author_category":"","last_name":"","first_name":"Couchbase Product Marketing","job_title":"","user_url":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/14201","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\/82066"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=14201"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/14201\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/14209"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=14201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=14201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=14201"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=14201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}