Search code examples
restcouchbasecouchbase-sync-gateway

How does Couchbase Sync Gateway get Couchbase Server changes?


What mechanism does Couchbase Sync Gateway use for getting the database changes in the couchbase server.

  1. Does it do a long Poll or create a websocket connection ?
  2. Or does is frequently invokes Couchbase server REST API ? If so then which REST API and what are the queries that it sends in the HTTP request for that REST API?

Solution

  • Neither - it uses DCP (the same underlying protocol used by replication and XDCR) to subscribe to updates from Couchbase Server.