Thanks for taking the time to look into my issue.
I currently have a MongoDB Atlas global write cluster with three region-specific shards in UK, US, and HK. The unsharded collections are located exclusively on the UK shard, which is causing geographic latency issues for users in the US and HK regions.
I’m exploring ways to replicate the unsharded collections data to the US and HK shards to address this issue. Here’s one potential approach I’ve considered:
Proposed Solution:
Dedicated Shard with Geo-Distributed Replica Sets
Move all unsharded collections to a dedicated shard in the cluster.Add replica sets for this shard in the US and HK regions.
Use read preferences (e.g., nearest or secondary) in my Spring Boot application to direct reads to the appropriate replica set, reducing latency.
Questions:1.) Is this a practical and standard approach for managing unsharded collections in a global cluster?
Given the relatively small size of the unsharded collections, would this approach be more cost-effective compared to creating a separate cluster for unsharded collections?
Pros of the Approach:
No need to manage multiple clusters or connection URLs, as replication happens within the existing cluster.Cost-efficient since we avoid creating and maintaining a separate cluster for unsharded data.
I would appreciate guidance from MongoDB Atlas experts on whether this approach is feasible and aligns with best practices.