Database Reference
In-Depth Information
In the preceding diagram, a chunk grows more than 64 MB so the splitting processes di-
vide it into two 32.2 MB chunks.
Note
The splitting process doesn't manage the migration of chunks and is only responsible for
making new chunks.
On the other hand, the balancing process task is to migrate chunks from one shard to an-
other. When the number of chunks in a shard is not properly sorted and doesn't have the
appropriate number of chunks, the balancing process migrates the chunk from a shard that
has a larger number of chunks to one that has the least amount.
In migration, the chunk migrates to the destination shard from the origin shard. MongoDB
then removes the chunk from the origin shard only when the migration is successfully
completed.
While migrating, queries to the target chunk route to the origin shard, so it prevents data
loss and failures.
The following diagram illustrates the procedure of migration from origin to the destina-
tion shard:
Search WWH ::




Custom Search