Advice required: Using sync gateway within a cross data center microservices architecture?

I’m not quite such how best to split up my APIs into microservices when sync gateway is in the mix. I want to auth my users with sync gateway, and the users app data will only exist in and by managed by sync gateway and couchbase, however ideally these are spread across endpoints. So a number of APIs will be involved to complete the application functions, an example might be an auth service, user service, store service, product service, invoice service etc. After the sync gateway auth process I’d need to hook into kong via an auth plugin https://konghq.com/plugins probably, hence I’m wondering if anyone else has done anything similar with sync gateway? Auth in itself would probably need be an isolated service, but it just so happens in order to benefit from offline / online sync etc the rest of the app data probably needs to reside in the same database. I’m not sure… any advice would be great. Cheers.

@derekdon I’m not totally following what you’re trying to do. For example, are you thinking about a separate Sync Gateway instance per micro-service?

A diagram might help if you can throw something together.

Also, I will mention that with master-master replication between different Sync Gateways, using Sync Gateway Replications is the only viable option, but it doesn’t sync users, which might leave a gap in the functionality you need.