You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/03/18 23:45:21 UTC
[couchdb-documentation] branch master updated: Document
seq_interval parameter (#261)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
The following commit(s) were added to refs/heads/master by this push:
new 87a4f3f Document seq_interval parameter (#261)
87a4f3f is described below
commit 87a4f3f90867a39aef63c831368f5fccc5631001
Author: Juanjo Rodriguez <jj...@gmail.com>
AuthorDate: Mon Mar 19 00:45:19 2018 +0100
Document seq_interval parameter (#261)
* Document seq_interval parameter
---
src/api/database/changes.rst | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/api/database/changes.rst b/src/api/database/changes.rst
index 41c581d..7bdfe11 100644
--- a/src/api/database/changes.rst
+++ b/src/api/database/changes.rst
@@ -102,6 +102,13 @@
counted as "passed" for view filter in case if map function emits
at least one record for them.
See :ref:`changes/filter/view` for more info.
+ :query number seq_interval: When fetching changes in a batch, setting the
+ *seq_interval* parameter tells CouchDB to only calculate the update seq
+ with every Nth result returned. By setting **seq_interval=<batch size>**
+ , where ``<batch size>`` is the number of results requested per batch,
+ load can be reduced on the source CouchDB database; computing the seq
+ value across many shards (esp. in highly-sharded databases) is expensive
+ in a heavily loaded CouchDB cluster.
:>header Cache-Control: ``no-cache`` if changes feed is
:ref:`eventsource <changes/eventsource>`
:>header Content-Type: - :mimetype:`application/json`
@@ -191,7 +198,8 @@
.. versionchanged:: 1.4.0 Support ``Last-Event-ID`` header.
.. versionchanged:: 1.6.0 added ``attachments`` and ``att_encoding_info``
parameters
-.. versionchanged:: 2.0.0 update sequences can be any valid json object
+.. versionchanged:: 2.0.0 update sequences can be any valid json object,
+ added ``seq_interval``
.. note::
If the specified replicas of the shards in any given since value are
@@ -201,6 +209,13 @@
of the `_changes` feed should be ‘idempotent’, that is, able to receive the
same data multiple times, safely.
+.. note::
+ Cloudant Sync and PouchDB already optimize the replication process by
+ setting ``seq_interval`` parameter to the number of results expected per
+ batch. This parameter increases throughput by reducing latency between
+ sequential requests in bulk document transfers. This has resulted in up to
+ a 20% replication performance improvement in highly-sharded databases.
+
.. warning::
Using the ``attachments`` parameter to include attachments in the changes
feed is not recommended for large attachment sizes. Also note that the
--
To stop receiving notification emails like this one, please contact
wohali@apache.org.