Is my sync_gateway bucket supposed to be empty?

I created one bucket for my application, which has all the documents to run the app, but is also filling up with _sync documents… such as:

_sync:seq 5157

_sync:session:044db6ee3f405ctta1443603982668c2e6ba48aa
{
  "id": "044db6ee3f405ctta1443603982668c2e6ba48aa",
  "username": "chef123",
  "expiration": "2015-07-22T01:54:31.967523465Z",
  "ttl": 86400000000000
}

_sync:user:chef123
{
  "name": "chef123",
  "all_channels": {
    "!": 1
  },
  "sequence": 2,
  "rolesSince": {}
}

Meanwhile, the sync_gateway bucket is totally empty. Is this how it’s supposed to be?

My sync gateway config file looks like this:

{
    "adminInterface": ":4985",
    "bucket": "sync_gateway",
    "interface": ":4984",
    "log":["*"],
    "pretty": true,
    "verbose": true,
    "facebook" : {
        "register" : true
    },
    "databases":{
        "my-bucket-name":{
            "server": "http://cb-server1:8091",
            "users": {
                         "GUEST": {"disabled": true, "admin_channels": ["*"]}
                     },
            "bucket": "my-bucket-name",
            "sync": `function(doc) {channel(doc.channels);}`
        }
    }
}

Kind regards,
David

When I changed my config to this:

{
    "adminInterface": ":4985",
    "bucket": "sync_gateway",
    "interface": ":4984",
    "log":["*"],
    "pretty": true,
    "verbose": true,
    "facebook" : {
        "register" : true
    },
    "databases":{
        "my-bucket-name":{
            "server": "http://cb-server1:8091",
            "users": {
                         "GUEST": {"disabled": true, "admin_channels": ["*"]}
                     },



            "bucket": "sync_gateway",



            "sync": `function(doc) {channel(doc.channels);}`
        }
    }
}

Then it started putting the sync documents in sync_gateway.

My hunch is that I would have better performance if I put sync in the same bucket as my app data, because then I could give that bucket all the RAM (rather than putting half the RAM in the sync_gateway bucket). True?

Kind regards,
David

The sync_gateway bucket is the default that SyncGateway uses if you don’t specify another bucket name. So, you don’t really need it if you’ve already specified another bucket name.

If you’re not doing bucket shadowing, then you need just the one bucket and that can be named whatever you like.

1 Like

Good to know. Thanks!