Jda,
So my highly educated guess based on your posting and your config file is this is a revision thing where you are keeping the last twenty revisions of the document, and sync needs to make sure you have the latest. Without delta sync, it’s a full pull of the document to compare since the documents, revision information, and tombstone information is all stored in Couchbase Server (I can tell this from your config file: enabled_shared_bucket_access=true). If I ask for a document of type “User” where the Id = 1, it still has to go to the server, pull the document, and then the revision information (metadata) to make sure you have the latest version. Since this is all stored in CB Server, Sync Gateway will take a small amount of type to calculate what is the latest revision and then send only that down to the mobile client, which is what you are seeing.
Delta sync does help quite a bit with this, and it’s one of my favorite features:
I would note that Delta Sync is an Enterprise-only feature but is well worth it given how much time and bandwidth it can save. As for truncating versions, you are doing that in the config file when you set the number of revisions to save.
The new version of Sync Gateway is available, and one thing it does offer is a backward compatibility mode where you can use your older 2.8.3 config file with it, and it should just work, so moving to the newer version is less painful since you can use that older config file but get some of the newer features and fixes as part of upgrading. I would always recommend POCing the upgrade before just throwing it in somewhere like your Dev, Staging, or Production environment, but I’ve already done this in several of my projects, and the new version with my older config files works great.
Editing the sync function manually in your config file is time-consuming when you have several servers in your cluster, and you have to watch out for your escape characters, etc. Most customers do use the API for updating it as they can put it into automation scripts. It’s my preferred method just from an automation standpoint.
-Aaron