This is just an idea on MongoDB ObjectId
If you want to split data on multiple shards using only the _id field
sh.enableSharding("demo");
sh.shardCollection("demo.foo", { _id : 1 } );
sh.addTagRange("demo.foo", { _id: MinKey }, { _id: ObjectId("640000000000000000000000") }, "DC1");
sh.addTagRange("demo.foo", { _id: ObjectId("640000000000000000000000") }, { _id: MaxKey }, "DC2");
When the app starts you have to set the right value for the data-center identifier to target data to desired data-center using only the _id field
DataCenterAwareIdGenerator.DataCenter = 200;