Skip to content

Beta 3 Changes

Jens Alfke edited this page Mar 12, 2014 · 1 revision

Here's what's new in the Sync Gateway since beta 2.

Bucket Shadowing

This allows the Sync Gateway to serve a 'shadow' copy of a bucket. The original bucket can be managed using regular Couchbase Server APIs. If you're already using Couchbase Server and want to make some of your existing data available to mobile clients by adding the Sync Gateway, this is the recommended approach. See the Bucket Shadowing page for details.

Configuration

New top-level configuration properties:

  • compressResponses: set this to false to disable GZip compression of HTTP responses, if your gateway is behind a proxy server that applies its own compression.
  • maxFileDescriptors: The maximum number of open file descriptors/sockets. The gateway calls setrlimit at startup time to request 5000 file descriptors, but if you need more (which is likely for heavily loaded servers) you can set this property to request a higher number.

New database configuration properties:

Admin API

  • Inspection of document channel assignments and access grants.
    • If you GET /db/_all_docs?channels=true from the admin port, each row’s value will include a channels property whose value is an array of the channels that document is in.
    • With ?access=true, there’s an access property whose value is a dictionary mapping user and role names to arrays of channels they’re granted access to by this document. (Role names are prefixed with role:.)
    • If you want to get info for only specific documents, you can either use the startkey and endkey parameters, or POST with a JSON body that’s an array of the document ID(s).
  • You can see the database's current sync function by doing a GET /db/_config.
  • GET /_expvar will return a (large) JSON response containing a lot of internal statistics about the gateway. We use this internally for performance testing but it could be useful to you too. See the expvars page for details.

Performance

  • Support for GZip-compressed HTTP requests and responses.
  • Support for running a continuous _changes feed using the WebSockets protocol.
  • In-memory caching of recently requested document bodies
  • In-memory caching of recent change history

Misc.

  • GET /db no longer includes a doc_count property. It's quite expensive to count the number of documents in a Couchbase bucket. This URL gets accessed at the beginning of every replication, so the overhead of including doc_count was significant, even though it appears to be unused.
Clone this wiki locally