You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/18 23:45:21 UTC

[GitHub] wohali closed pull request #261: Document seq_interval parameter

wohali closed pull request #261: Document seq_interval parameter
URL: https://github.com/apache/couchdb-documentation/pull/261
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services