What’s new in Couchbase Server 4.0

Couchbase Server version 4.0 is a major release that provides significant enhancements to N1QL, indexing, and security.

Couchbase Server 4.0 includes significant advances in both architecture and features. The major innovations in 4.0 include multidimensional scaling (MDS), N1QL, and the ForestDB storage engine. These capabilities dramatically extend the scalability and performance advantages of Couchbase Server, as well as the ability to support a much broader set of use cases.

With MDS and N1QL, Couchbase Server 4.0 is the first and only database to combine the powerful query capabilities of a relational database with the performance, scalability, and flexibility of a NoSQL database. With Couchbase Server 4.0 you can query billions of documents and meet the performance and scalability requirements of enterprise web, mobile, and Internet of Things (IoT) applications with a NoSQL database.

Multidimensional scaling

Couchbase has redefined the way enterprises scale distributed databases with the option of multidimensional scaling. It separates, isolates, and scales individual services—query, index, and data—to improve application performance and increase resource utilization. Couchbase Server 4.0 is the first and only distributed database capable of scaling with the speed and precision required by enterprise applications with variable workloads.

MDS enables enterprises to optimize hardware by allocating resources based on the workload of a specific service and to avoid resource contention by performing queries, maintaining indexes, and writing data with different nodes. It is inefficient to require participation from every node to perform a query or maintain an index. Couchbase Server 4.0 solves this problem by scaling data independent of queries and indexes.

MDS provides the following benefits:

  • Improves performance by separating services to avoid resource contention

  • Improves performance by scaling the data service, not the query and index services

  • Improves resource utilization by separating services to optimize the hardware


N1QL is the most complete SQL implementation for a NoSQL database. It combines the expressive power of SQL, including joins, with the flexibility of JSON documents. Now you can query Couchbase Server with standard database drivers, your preferred enterprise or web framework, RESTful web services, or a simple API for building and executing queries. You can also leverage the business intelligence and reporting tools of your choice.

N1QL facilitates your transition to a NoSQL database by leveraging your existing SQL and data modeling knowledge. You can create a data model with enough structure to support complex queries without losing the flexibility of JSON documents. The completeness of N1QL eliminates the need to maintain complex query logic within the application because you do not need to create multiple queries to combine related data.

N1QL enables you to:

  • Query data with enterprise business intelligence and reporting tools

  • Query data with existing enterprise and web frameworks, no SQL required

  • Query data with a fluent API by building queries or executing SQL statements


In addition to the existing incremental MapReduce-based indexer known as views, Couchbase Server provides a new indexer for N1QL queries named global secondary index (GSI).

GSI provides fast access for N1QL queries. With the support of GSI, you can submit queries that target specific lookups on secondary attributes in your JSON documents with greater efficiency. For example, you can look up customers by email address rather than relying on a customer key.

GSI provides the following benefits with its unique architecture:

  • Allows indexing without compromising on core data operation performance.

  • Improves index efficiency by avoiding gather-scatter and index working set management

  • Improves application scalability by allowing indexing services to scale up independently

For more information, see Indexing.

Spatial views

Spatial views enable location-aware applications to query data based on geographic coordinates. Applications can incorporate queries that identify containment of points and shapes in a bounding box. Spatial views have been available as an experimental capability in earlier versions. With version 4.0, spatial views become a supported part of the Couchbase Server experience.


Couchbase Server takes data security to a new level. We facilitate secure deployments by providing security controls to access the entire stack, from physical protection of the network infrastructure to Couchbase Server and the deployed applications.

New security features include:

  • Configurable audit trails that capture who does what, when they do it, and how they do it

  • Lightweight Directory Access Protocol (LDAP) integration for identify management

Cross Datacenter Replication (XDCR) – Filtering

XDCR can be used for many purposes, but for some users XDCR is a means of making data available to geographically distributed locations with low latency. In this case, filtering will make XDCR more efficient.

Here are different scenarios were filtering with XDCR will be useful:

  • Delivering data relevant to geography.

  • Maintaining reference data with many deployments.

XDCR filtering is expressed as a RegEx expression on a replication and filters on keys.