Is Couchbase sync protocol incremental?

Hi guys,

I was wondering how the syn protocol between Couchbase Lite and Sync Gateway actually works.

Let’s suppose a document is updated (we changed the value of a single field). This even will create a new revision and will trigger an update.
However, what is not clear to me is how the document will be updated on the client: will the client need to download the whole document from the sync gateway? Or does the sync gateway generate something like a “diff” between the current version and the old ones? As you can imagine that would make a huge difference in the efficiency of the sync.


We don’t do delta syncs at this time- its under consideration. @jens could speak to the compression capabilities that we have.
Not sure which version of the platform you are on but this would be a useful read

Looks like a very interesting read. Thank you

The 2.0 replicator gzip-compresses [most of] the data stream, which has the effect of providing a lot of compression, since most docs use the same keys. But yes, doc revisions are always sent in their entirety. This is one of several good reasons not to create giant documents.

(Blobs, however, are sent separately from documents. So an unchanged blob will not be retransmitted, even if the body of the doc changed.)

1 Like

@jens tahnk you for the additional details!