I am a newbie on mongoDB. I have been reading about sharding and sharing keys and I do not find a way to configure it the way I want. I have large - about 5-6 GB - binary files -e.g. float matrix- which I want to distribute over a cluster using GridFS. The point is I want the chunks to be contiguous so when my script asks for a certain portion of the matrix, it does not have to bring them from other shard, so I get Query Isolation.

How can I set up the sharding key to accomplish this?

有帮助吗?

解决方案

I figured out.

Using files_id as sharding key yields to contiguous chunks in each replica set which is perfect for query isolation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top