1.8. 2.0.x Branch — Apache CouchDB® 3.3 Documentation

# 1.8. 2.0.x Branch

## 1.8.1. Version 2.0.0

- Native clustering is now supported. Rather than use CouchDB replication between multiple, distinct CouchDB servers, configure a cluster of CouchDB nodes. These nodes will use an optimized Erlang-driven ‘internal replication’ to ensure data durability and accessibility. Combine a clustered CouchDB with a load balancer (such as `haproxy`) to scale CouchDB out horizontally. More details of the clustering feature are available in the Cluster Management.

- Futon replaced by brand-new, completely re-engineered Fauxton interface. URL remains the same.

- The new Mango Query Server provides a simple JSON-based way to perform CouchDB queries without JavaScript or MapReduce. Mango Queries have a similar indexing speed advantage over JavaScript Queries than the Erlang Queries have (2x-10x faster indexing depending on doc size and system configuration). We recommend all new apps start using Mango as a default. Further details are available in the _find, _index and _explain API.

- Mango selectors can be used in _changes feeds instead of JavaScript MapReduce filters. Mango has been tested to be up to an order of magnitude (10x) faster than JavaScript in this application.

- Rewrite rules for URLs can be performed using JavaScript functions.

- Multiple queries can be made of a view with a single HTTP request.

- Views can be queried with sorting turned off ( `sorted=false`) for a performance boost.

- The global changes feed has been enhanced. It is now resumable and persistent.

- New endpoints added (documentation forthcoming):

  - /_membership shows all nodes in a cluster

  - `/_bulk_get` speeds up the replication protocol over low-latency connections

  - `/_node/` api to access individual nodes’ configuration and compaction features

  - `/_cluster_setup` api to set up a cluster from scratch.

  - `/_up` api to signal health of a node to a load-balancer

  - `/db/_local_docs` and `/db/_design_docs` (similar to `/db/_all_docs`)

- The `/_log` endpoint was removed.

- “Backend” interface on port 5986 used for specific cluster admin tasks. Of interest are the `_nodes` and `_dbs` databases visible only through this interface.

- Support added for Erlang/OTP 17.x, 18.x and 19

- New streamlined build system written for Unix-like systems and Microsoft Windows

- Configuration has moved from `/_config` to `/_node/{node-name}/_config`

- `instance_start_time` now always reports `"0"`.

## 1.8.2. Upgrade Notes

- The update sequences returned by the /db/_changes feed are no longer integers. They can be any JSON value. Applications should treat them as opaque values and return them to CouchDB as-is.

- Temporary views are no longer supported.

- It is possible to have multiple replicator databases. `replicator/db` config option has been removed. Instead `_replicator` and any database names ending with the `/_replicator` suffix will be recognized as replicator databases by the system.

- Note that the semantics of some API calls have changed due to the introduction of the clustering feature. Specifically, make note of the difference between receiving a `201` and a `202` when storing a document.

- `all_or_nothing` is no longer supported by the bulk_docs API

- After updating a design document containing a `show`, an immediate GET to that same `show` function may still return results from the previous definition. This is due to design document caching, which may take a few seconds to fully evict, or longer (up to ~30s) for a clustered installation.

## 1.8.3. Known Issues

All known issues filed against the 2.0 release are contained within the official CouchDB JIRA instance or CouchDB GitHub Issues.

The following are some highlights of known issues for which fixes did not land in time for the 2.0.0 release:

- COUCHDB-2980: The replicator (whether invoked via `_replicate` or a document stored in the `_replicator` database) understands two kinds of source and target:

  1. A URL (e.g., `https://foo:bar@foo.com/db1`), called a “remote” source or target

  2. A database name (e.g., `db1`), called a “local” source or target.

  Whenever the latter type is used, this refers to a local unclustered database, not a clustered one.

  In a future release we hope to support “local” source or target specs to clustered databases. For now, we recommend always using the URL format for both source and target specifications.

- COUCHDB-3034: CouchDB will occasionally return 500 errors when multiple clients attempt to PUT or DELETE the same database concurrently.

- COUCHDB-3119: Adding nodes to a cluster fails if the Erlang node name is not `couchdb` (of the form `couchdb@hostname`.)

- COUCHDB-3050: Occasionally the `dev/run` script used for development purposes to start a local 3-node cluster will fail to start one or more nodes.

- COUCHDB-2817: The compaction daemon will only compact views for shards that contain the design document.

- COUCHDB-2804: The fast_view optimization is not enabled on the clustered interface.

- #656: The OAuth 1.0 support is broken and deprecated. It will be removed in a future version of CouchDB.

## 1.8.4. Breaking Changes

The following changes in 2.0 represent a significant deviation from CouchDB 1.x and may alter behaviour of systems designed to work with older versions of CouchDB:

- #620: `POST /dbname` no longer returns an ETag response header, in compliance with RFC 7231, Section 7.2.