Sync Gateway create Bucket runtime?

Hi everyone. I’m new to the Couchbase technology but I had a look at the documentation in these days.

What I wanted to ask, is if it was possible to add syncable buckets at runtime. I’ve seen that I can create new DB (Buckets) on the Couchbase server at runtime, but the sync gateway is completely unaware of it! Is it possible to “connect” the gateway to the new bucket without actually reboot it with the new configuration?

Many thanks!

I think you might want to start thinking about channels so they can be configured as the need arises.
It would still require re-authentication by the user I believe, but then you could specify more succinctly the data to which you’d like clients/users to see.

http://developer.couchbase.com/mobile/develop/guides/sync-gateway/channels/index.html
Austin

Yes I know I can structure data with channels. I wanted to know if it would have been the only way :slight_smile: So I can go to the next question:
Does Sync Gateway work better with 1 Database with millions of records or a thousand of databases with a thousand of record each?

Structuring data with Channels is the most efficient way to access data through sync gateway where you want to provide a level of security or access control and manageability. Regarding buckets, depending on the size of documents and type of nodes, 1M documents can fit within a single cluster quite easily. Adding a second gateway to the configuration and using a load-balancer will provide resiliency at the gateway level.