Inter Sync Gateway Replication using App Services

So, we got our platform setup to use Capella (Including app services). We were able to get the app services working and get the cb-lite sync working on mobile devices. It simplifies our DevOps and we are able to stay focused on our core value prop.

One thing that we want to be able to do is “Inter Sync Gateway replication” between two couchbase clusters. Our use case is simple :

  1. Draft Content will stay in CB Cluster 1
  2. When the content is finalised, the content will be published to CB Cluster 2 via Sync Gateway 1
  3. Mobile devices sync CB Lite data from CB Cluster 2 via Sync Gateway 2

Is there a way to do all of this in Capella? If not, is there any recommended approaches/architectures for problems like this?

@priya.rajagopal (Tagging Priya because I know she is a couchbase mobile expert)

@PShri App Services does not support inter Sync Gateway replication as yet- It is on the roadmap. So in your architecture, are CB cluster1 and CB cluster2 both on App Services or is one of the clusters on prem. Curious if there is a specific need for SGW in CB Cluster1.

@priya.rajagopal Both clusters are on App Services.

We envisage CB Cluster 2 to be moved to the edge.

SGW in CB Cluster 1 is to sync the data with CB Cluster 2. Thats the inter sync gateway.

@priya.rajagopal : What is your take on using Inter SGW (ISGW) between clusters for the use case I described where one cluster is for Draft content (content that is still being edited) and one for Published content (content that is ready for consumption by app client).

I got some responses from others and no-one seems to recommend using ISGW based solution. To me it seems like a no brainer to use ISGW for this use case. I am unsure if I am missing/misunderstanding something basic here.

I am happy to get on a call to discuss more about the architecture and talk in detail about our use case.

What do you mean by “Edge” here?

Why do you need SGW in both clusters? Am I right in assuming that the CBL clients are only connected to the “Published” cluster.

@priya.rajagopal : Below is my response.

What do you mean by “Edge” here?

Any infrastructure that is closer to the end user. Could be AWS local zones or On Prem infrastructure

Why do you need SGW in both clusters? Am I right in assuming that the CBL clients are only connected to the “Published” cluster

That is right, CBL clients are connected only to the published cluster

The other SGW is to sync between “Draft” cluster and “Published” cluster when a content creator chooses to “publish” content in the editing process

One thing I want to highlight is “Draft” doesn’t mean it is in a staging environment. Even that is in “Production” environment. This was one of the confusions in one of our other interactions

PS : I completely forgot to respond to this post. I saw the notification on my phone and didn’t get back to it on laptop


Getting back to this issue now. What’s your take on separating “Draft” content and “Publish” content as multiple couchbase clusters?

Since you have on CBM cluster ( CB/ SG) at the “edge” and one in cloud (Capella App Services), you can use IGSR to keep the two in sync. My understanding is that you have writes coming in through both clusters so you need bi-directional sync in which case, your only choice is ISGR between Capella App Services and self managed CMB cluster at the edge. If my assumption is wrong - i.e. you only have writes coming into the draft cluster and published cluster has no writes coming in- then you could just do one-way XDCR from the draft to published cluster,

1 Like

Thank you @priya.rajagopal

Yes, our writes are two way. So ISGR seems to be the way.

Will the architecture be different if the published cluster is also in the cloud (as opposed to being edge). We envision that to be the starting point.