Sync Gateway and multiple buckets

87 views
Skip to first unread message

Daniel McGreal

unread,
Aug 18, 2014, 5:35:51 AM8/18/14
to mobile-c...@googlegroups.com
The SG documentation at Configuration Files suggests that SG can support multiple buckets per SG instance?
Is it possible to add (or remove) buckets without restarting SG? If not, where would I need to look to add such functionality?
Best, Dan.

Jens Alfke

unread,
Aug 18, 2014, 12:19:53 PM8/18/14
to mobile-c...@googlegroups.com
On Aug 18, 2014, at 2:35 AM, Daniel McGreal <d.j.m...@gmail.com> wrote:

The SG documentation at Configuration Files suggests that SG can support multiple buckets per SG instance?

Yes, just add multiple items to the top-level "databases" object in the config.

Is it possible to add (or remove) buckets without restarting SG? If not, where would I need to look to add such functionality?

Yes, we added that feature for Couchbase Cloud. To add a database you PUT to its URL (/dbname) with a JSON body that's the same data you'd put in the config file's "databases" object. To remove a database you DELETE its URL; this doesn't actually do anything to the bucket on Couchbase Server, it just unhooks it from the Gateway.

The catch is that these operations don't update the config file. You're responsible for doing that yourself. (Or you can decide not to put the database config in the config file at all, and just issue a series of PUTs on startup.)

—Jens

Dan

unread,
Aug 18, 2014, 12:37:37 PM8/18/14
to mobile-c...@googlegroups.com
Thanks Jens, that's great.

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/IcrxDtfIpa4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/512F6B47-0177-4821-9559-6B881DC7A993%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages