Sync availability around the world


We have some concerns about the availability of the Sync service around the world (namely in mainland China). Could you clarify them?

Consider the following deployment example:

  1. MongoDB Atlas cluster is deployed at AWS Ireland
  2. Realm App is deployed as a global one.
  3. The app is linked to the cluster
  4. A Mobile app uses RealmDB with Sync.

A user is in mainland China and tries to use the mobile app.

How the mobile app does service discovery? As far as I understand, there is a worldwide service for it and the whole process looks like the following:

  1. The mobile app asks the global endpoint “Where can I find the UniqueProjectID?” 2. The endpoint answers “Here you are https://very-long-url-that-points-to-the-cluster-in-Ireland”.
  2. The mobile app connects to the endpoint-in-Ireland and does synchronization

Do I understand right? If I do, is that global endpoint actually available from mainland China (we know about their Great Firewall)? Do you do something to keep working if they block the global endpoint some day (maybe accidentally, maybe intentionally)? What if the https://very-long-url-that-points-to-the-cluster-in-Ireland is blocked? Do you do something about it?

We are really interested in this topic. Actually, we discard using Google Firebase because it is not available in mainland China. Now we are considering MongoDB Realm and Couchbase. With Couchbase everything is clear. One just installs it where he needs and passes its url to the mobile application.

Could you, please, clarify how you solve (or are going to solve) this case?
Thank you in advance!

@111463 So we generally recommend deploying a local app and placing your Atlas & RealmSyncApp in the same region as Realm Sync for performance reasons -

In the case of China, the closest region would be Singapore -

If you needed a Global app then the way it works is that the client first figures out which region to connect to first based on latency and will connect and begin transferring sync data. In the case of Chinese users, they will most likely connect to Sydney. Unfortunately, there is nothing Realm can do if you are blocked by the Great Firewall of China.

Thank you, got it. Could you please give some more details so that we can understand the reliability of the whole system?

How does the client technically figure out which region to connect to? Is there a single global endpoint that the client asks and the endpoint answers with the list of all regions’s endpoints? (for example
Or does the client hold a list of all endpoints around the world and try them one by one?

Yes it is a single endpoint that checks latency and client location

Got it. Thank you! Excuse my persistence, but could you please tell if you intentionally check this endpoint on availability from different regions around the world (and in China, of course).

Why am I asking? There are two big differences:

  1. A service just works in China because it happened so.
  2. A company intentionally set the goal of “Provide strong availability around the world” and does its best to provide it: continually checking availability, registering the endpoints with the relevant authorities (if a country requires it) and so on.

As you can suppose, when one is picking a platform for building his international business, these differences are really different for him)