SyncGateway Scaling

27 views
Skip to first unread message

conorm...@gmail.com

unread,
Aug 13, 2014, 6:06:33 AM8/13/14
to mobile-c...@googlegroups.com
Hi All,

I'm wondering if Sync Gateway will scale well for my application. This is my setup:

- CouchDB Server - 1k+ dbs
- Sync Gateway
- Couchbase Lite

I want to share each couch db with a mobile user via Sync Gateway. Each user will only be connected to one db, and each db can only be accessed by one user. This means I will have 1k+ Sync Gateway processes running to facilitate 1k users. This does not seem like a scalable solution.

Can anyone advise if this will be scalable? Otherwise, are there any alternatives? I'd like to keep my current DB architecture in place if possible.

Thanks

Conor

Jens Alfke

unread,
Aug 13, 2014, 1:34:30 PM8/13/14
to mobile-c...@googlegroups.com

On Aug 13, 2014, at 3:06 AM, conorm...@gmail.com wrote:

I want to share each couch db with a mobile user via Sync Gateway. Each user will only be connected to one db, and each db can only be accessed by one user. This means I will have 1k+ Sync Gateway processes running to facilitate 1k users. This does not seem like a scalable solution.

It's not scaleable. Couchbase Server does not scale to large numbers of buckets, mostly because each bucket is pre-allocated a fairly large amount of RAM. It's not recommended to have more than a dozen or two buckets in a cluster.

Otherwise, are there any alternatives? I'd like to keep my current DB architecture in place if possible.

You should try to design your system to use a single database shared by all users. The Sync Gateway was expressly designed to support this, so it has a lot more access control than CouchDB does. 

Back in 2012 we tried to build a system (SyncPoint) based on CouchDB that used a one-db-per-user model, and realized it wasn't going to work well. It was kludgy to configure and not scaleable, especially if users shared documents.

—Jens
Reply all
Reply to author
Forward
0 new messages