MongoDB Question:

Download Job Interview Questions and Answers PDF

Tell me when will data be on more than one shard?

MongoDB Interview Question
MongoDB Interview Question

Answer:

MongoDB sharding is range based. So all the objects in a collection get put into a chunk. Only when there is more than 1 chunk is there an option for multiple shards to get data. Right now, the default chunk size is 64mb, so you need at least 64mb for a migration to occur.

Download MongoDB Interview Questions And Answers PDF

Previous QuestionNext Question
Explain how does sharding work with replication?Explain what happens if I try to update a document on a chunk that is being migrated?