0

Does it make sense to define a channel per 1-4 documents?

The use case I am trying to solve is synching user's accounts between different devices of the same user:
For example lets say I have 1 million docs (accounts) in my bucket, then defining 400K channels, a channel for each user. in this example I have 400K users each with 2.5 accounts in average.

Does this sound like a right case for Sync Gateway?

belostoky
  • 934
  • 2
  • 11
  • 22

1 Answers1

0

As per CB documentation about roles:

Roles are named collections of channels. A user account can be assigned to zero or more roles. A user inherits the channel access of all roles it belongs to. This is very much like Unix groups, except that roles do not form a hierarchy.

That would hint me that your approach should be amended and you should design channels with roles in mind. As a result you'll have less channels. You could work out roles like: userGroupA, userGroupB, etc.

In my humble opinion, your approach sounds bit "unscalable" since if number of users grows so does the channels number.

user1697575
  • 2,830
  • 1
  • 24
  • 37