New In 4.0

      +

      Couchbase Sync Gateway — What’s new in the latest release
      This content covers the new features introduced in Sync Gateway 4.0

      Sync Gateway 4.0 introduces some breaking changes. If you’re upgrading from 3.x, see Upgrading Sync Gateway.

      Overview of Sync Gateway 4.0

      Sync Gateway 4.0 represents a major architectural evolution, transitioning from revision trees to version vectors as the foundation for document revision tracking.

      This architectural change enables true active-active mobile cluster deployments with bidirectional Cross Data Center Replication (XDCR) while maintaining data consistency and conflict resolution capabilities.

      Cross Data Center Replication (XDCR) Interoperability

      • Bi-directional XDCR between mobile clusters Sync Gateway now supports two way active-active replication using Couchbase Server’s XDCR across mobile clusters. This enables active-active deployments with high availability and no downtime during fail over or disaster recovery.

      • Unified versioning of documents compatible with both XDCR and Mobile products. Allows for new deployment architectures and consistent conflict resolution.

      Conflict Resolution with Version Vectors

      • Sync Gateway 4.0 leverages version vector–based conflict resolution for XDCR.

      • By default, Sync Gateway resolves conflicts using Last Write Wins (LWW), with the option to use Couchbase Server’s custom conflict resolution (CCR).

      • Developers can extend with custom conflict resolvers to meet application-specific needs.

      This ensures consistency across mobile and server data while maintaining performance during high-volume replication.

      For more information, see Version vectors.

      Compatibility

      • Requires Couchbase Server 7.6.6+ for XDCR interoperability.

      • Couchbase Lite 4.0 provides full compatibility with Sync Gateway 4.0, including the ability to switch between clusters while maintaining consistency.

      • Earlier Couchbase Lite versions (3.x and 2.x) can synchronize with Sync Gateway 4.0 but cannot switch between clusters without potential consistency issues.

      Couchbase Lite 4.0 with Sync Gateway 3.2.0 and 3.3.0 is unsupported.

      Connecting Couchbase Lite 4.0 to Sync Gateway versions before 4.0 is not supported. Use Sync Gateway 4.0 for Couchbase Lite 4.0 compatibility. Fixes for SGW 3.2.0 and 3.3.0 will be available in versions 3.2.7 and 3.3.1.

      Upgrading

      Upgrading to version 4.0 is a one way process.