Exclude MongoDB Collection from Atlas Device Sync

Greetings!

I have a few collections which are used exclusively by Atlas functions, and not intended for client consumption through Device Sync. For consistency, I have added schema for these collections, but I’ve noticed they are now automatically added to Device Sync, and it seems something like a breaking schema change could potentially trigger a client reset, even though the collection is not synced by any client. This also leads me to think there might be overhead that could be lowered if these collections are excluded from Device Sync. As possible options, it looks like a collection is no longer visible to the Device Sync configuration if I remove the schema, or I could potentially move the collections to a different database.

Questions:

  1. Is this concern about an un-synced schema change valid?
  2. Are these collections using unnecessary resources for Device Sync?
  3. What is the best solution to exclude these collections from Device Sync?

Thanks!

Hi, Ill try my best to answer your questions.

  1. Yes, this is a valid concern. Sync will keep metadata (history and state) for all collections that have schemas defined in App Services
  2. Yes, see above
  3. We strongly encourage customers to separate their services into different applications. IE, do not use a single app for Device Sync, triggers, functions, graphql, etc, and instead consider splitting them into an app-per-service model. There are a lot of benefits to this including isolation between applications which I think aids maintainability/observability.

Removing schemas is a “destructive change”, so beware that clients will reset (shouldn’t be an issue, but something to be aware of)

Best,
Tyler