Skip to content

Instantly share code, notes, and snippets.

@BigBlueHat
Created February 6, 2015 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BigBlueHat/a3aa5888bcabd5ebe7bf to your computer and use it in GitHub Desktop.
Save BigBlueHat/a3aa5888bcabd5ebe7bf to your computer and use it in GitHub Desktop.
TL;DR of CouchDB 2.0 Architecture

Originally composed as IRC messages by the venerable rnewson.

In Apache CouchDB 2.0, there's no such notion of committed. It's AP not CP.

What happens is a write is applied to N nodes (default is 3) and a 201 response is returned when the first W nodes (default is 2) respond with success. A 202 response is sent if < W writes (but > 0) were made. Every node, on receiving an update, does an automatic replication to the others (using an internal, faster, system than _replicate).

Documents are read from N nodes that hold a copy, and a 200 response is sent (and the document) when the first R nodes respond with the same revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment