Akeem
Akeem

Reputation: 8217

Couchbase sync gateway buckets and database

I have an app I'm developing where each user has their own database and I want them to be able to sync across devices. It seems as if buckets and databases should have a one to one relationship (I tried putting two databases I created via the sync-gateway admin api in one bucket and the item count returned was the total of both databases combined). Creating a bucket per database seems a bit much because you have to define the amount of ram per bucket in advance which is less than ideal.

I'm trying to figure out how do buckets fit into the architecture? Do I need to create a bucket per database?

Upvotes: 0

Views: 948

Answers (1)

Matt Ingenthron
Matt Ingenthron

Reputation: 1894

It's not recommended to have one database per user. Have a look at the "channels" feature to SyncGateway in the Couchbase documentation: http://docs.couchbase.com/sync-gateway/#developing

Upvotes: 3

Related Questions