Hi Glenn!
As you have discovered there are basically 3 data divisions in a sharded cluster:
1. Collections which are hosted by a single shard (default)
2. Collections which are hosted (somewhat evenly) across all shards (db.shardCollection)
3. Collections which are hosted across particular shards (db.shardCollection, sh.addShardTag, sh.addTagRange)
The outcome you want is covered by #3, and tags are the mechanism by which that is achieved. You cannot do it without using tags.
However, what you describe is a hardware division between 'fast' data and 'slow' data. You have described 2 clusters. Would you be able to separate your configuration into 2 clusters, one that is 'fast' and one that is 'slow'? This will mitigate the need for tags entirely.
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Your model is slightly off. Any given document can only be associated with zero or one tag.You cannot have a document be associated with multiple tags.
If in fact your description of your original use case is accurate in your adjectives "small" fast/current data and large old slow data then just tag your old range with HDD tag and tag your slow shards with HDD. Since there will be a lot more chunks on them than on "current" shards, the current data won't be migrated to slow shards.
One other difference you might consider - you say creation of collections can be implicit - but sharding of collections can never be implicit. It *must* be explicitly specified.