-
First... yes, I do know that Device Sync is deprecated. I still have to maintain and enhance this app that is already running while working on a transition plan. Can I have multiple instances of a .NET Core application using the same physical Realm? My app needs to auto-scale based on traffic. Spinning up a new instance and having the Realm sync to Atlas takes way longer than the timeframe that I need it to scale up. So I'm thinking that having a single Realm on a shared drive would help with that. New app spins up and connects to the shared Realm and is able to start running immediately. Does this work? What changes, if any, would I need to make to my app logic to support this? For example, would I need to have some way of detecting that there's already a sync thread running from one instance and not enable the sync thread in the rest of the instances? But in that case, what happens is that single instance dies? How do we know that the sync is being run? TIA! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's not possible to have multiple processes synchronizing the same Realm at the same time and there's no built in functionality in Realm that would allow you to orchestrate that. You'd need some external handover mechanism that detects that the process that owned the sync session has died and then promotes one of the other processes to "leader". |
Beta Was this translation helpful? Give feedback.
It's not possible to have multiple processes synchronizing the same Realm at the same time and there's no built in functionality in Realm that would allow you to orchestrate that. You'd need some external handover mechanism that detects that the process that owned the sync session has died and then promotes one of the other processes to "leader".