we have implemented couchbase server on our server, we are having 20K daily mobile installation which sync themselves with syncgateway, our data bucket currently have 25M documents and it uses 30GB RAM. We provided an shadow bucket for sync gateway bucket we use shadow bucket from our API Server which is implemented using Node.js.
I red somewhere that it is not good to have shadow bucket for this size of bucket.
Now my question is that is it right way to have Shadow Bucket or we should Read/Write using Sync Gateway REST API from our API Server or should we directly access Sync Bucket and Read/Write using NODE COUCHBASE SDK to Sync Bucket ?!!
I m worried because our document grow rate is 1M per month and RAM consume is growing so fast.
Bucket shadowing is being deprecated in 1.4 and will be unsupported in an upcoming version (2.x) of Couchbase Mobile. The recommended approach to perform operations on the bucket dedicated to Couchbase Mobile is to use the Sync Gateway REST API.
FYI
for write, you should use SG REST API. for read data,may be you can use N1QL.
for write you are right we have to write through Rest API, but for Read do you mean i should remove shadow bucket and read data from main sync bucket ?
yes,
Bucket shadowing is being deprecated in 1.4 and will be unsupported in an upcoming version (2.x) of Couchbase Mobile. so I think you should remove shadow bucket.
for read data, N1QL provide powerful ability you can use, and it is easy to scaling out.
you can deploy Couchbase Server cluster ,and write data into one node, and read data from another node.
I have a lot of things to do for these kind of change,
I ll remove the shadow bucket and refactor my API Server to do things in a right way.
thanks a lot for your .
but read data from sync bucket returns meta data too for each document.
i dont want _sync property in reading data.
you can use N1QL to remove _sync
object with OBJECT_REMOVE
function.