Sync Gateway behind a 3rd party Access Gateway

Dear forum,

I am planning to develop a mobile app (Android and iOS) that uses the offline capabilities and bidirectional replication of couchbase mobile and sync gateway. I already tested this successfully in a dev/test environment with 3 separate machines, client, SG and CB server.
Unfortunately my production environment uses a self made Access Gateway that is the single point of access for all our mobile apps, this gateway only works in REST, it provides authenticatcion, logging, “single point of entry”…etc.

My question:

  1. How can Sync Gateway work from behind my Access Gateway?
  2. Is the client mobile able to talk to other 3rd party endpoints that are located before the SG? or does it always expect the SG?
  3. Is it possible to use REST instead of WebSocket? (I think this is not an option :slight_smile: for you)
  4. What solution do you recommend that includes my Access Gateway
  1. Your access gateway will need to allow pass through connections
  2. No, only Sync Gateway as of 2.0 (technically an implementation of the BLIP protocol, which the only know server side implementation is sync gateway)
  3. Sync Gateway still accepts REST for compatibility purposes but all CBL 2.0+ uses WebSocket
  4. Allow pass through connections to Sync Gateway from your access server