16.4. 2.0.x Branch
16.4.1. Version 2.0.0
- Native clustering is now supported. Rather than use CouchDB replicationbetween multiple, distinct CouchDB servers, configure a cluster of CouchDBnodes. These nodes will use an optimized Erlang-driven ‘internal replication’to ensure data durability and accessibility. Combine a clustered CouchDB witha load balancer (such as
haproxy
) to scale CouchDB out horizontally. Moredetails of the clustering feature are available in the Cluster Reference. - 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 CouchDBqueries without JavaScript or MapReduce. Mango Queries have a similar indexingspeed advantage over JavaScript Queries than the Erlang Queries have (2x-10xfaster indexing depending on doc size and system configuration). We recommendall new apps start using Mango as a default. Further details are availablein the _find, _index and _explain API.
- Mango selectors can be used in _changesfeeds instead of JavaScript MapReduce filters. Mango has been tested to beup to an order of magnitude (10x) faster than JavaScript in this application.
- Rewrite rules for URLs can be performed usingJavaScript functions.
- Multiple queries can be made of aview with a single HTTP request.
- Views can be queried with sorting turned off (
sorted=false
) for aperformance 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-latencyconnections/_node/
api to access individual nodes’ configuration and compactionfeatures/_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. Ofinterest are the
_nodes
and_dbs
databases visible only through thisinterface. - Support added for Erlang/OTP 17.x, 18.x and 19
- New streamlined build system written for Unix-like systems and MicrosoftWindows
- Configuration has moved from
/_config
to/_node/{node-name}/_config
instance_start_time
now always reports"0"
.
16.4.2. Upgrade Notes
- The update sequences returned by the /db/_changes feed are no longerintegers. They can be any JSON value. Applications should treat them as opaquevalues 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 endingwith the/_replicator
suffix will be recognized asreplicator databases by the system. - Note that the semantics of some API calls have changed due to the introductionof the clustering feature. Specifically, make note of the difference betweenreceiving a
201
and a202
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 tothat sameshow
function may still return results from the previousdefinition. This is due to design document caching, which may take a fewseconds to fully evict, or longer (up to ~30s) for a clustered installation.
16.4.3. Known Issues
All known issues filed against the 2.0 release are contained within theofficial CouchDB JIRA instance or CouchDB GitHub Issues.
The following are some highlights of known issues for which fixes did not landin time for the 2.0.0 release:
COUCHDB-2980: The replicator (whether invoked via
_replicate
or adocument stored in the_replicator
database) understands two kinds ofsource and target:- A URL (e.g.,
bar@foo.com/db1"">https://foo:bar@foo.com/db1
), called a “remote” source ortarget - A database name (e.g.,
db1
), called a “local” source or target.
Whenever the latter type is used, this refers to a local unclustereddatabase, not a clustered one.
- A URL (e.g.,
In a future release we hope to support “local” source or target specs toclustered databases. For now, we recommend always using the URL format forboth source and target specifications.
COUCHDB-3034: CouchDB will occasionally return 500 errors when multipleclients attempt to PUT or DELETE the same database concurrently.
COUCHDB-3119: Adding nodes to a cluster fails if the Erlang node nameis not
couchdb
(of the formcouchdb@hostname
.)COUCHDB-3050: Occasionally the
dev/run
script used for developmentpurposes to start a local 3-node cluster will fail to start one or morenodes.COUCHDB-2817: The compaction daemon will only compact views for shardsthat contain the design document.
COUCHDB-2804: The fast_view optimization is not enabled on the clusteredinterface.
#656: The OAuth 1.0 support is broken and deprecated. It will beremoved in a future version of CouchDB.
16.4.4. Breaking Changes
The following changes in 2.0 represent a significant deviation fromCouchDB 1.x and may alter behaviour of systems designed to work witholder versions of CouchDB:
- #620:
POST /dbname
no longer returns an ETag response header,in compliance with RFC 7231, Section 7.2.