G
G
g00dv1n2016-11-08 19:42:22
MongoDB
g00dv1n, 2016-11-08 19:42:22

How to shard an existing database in Mongo?

There is a Mongo base, already almost 1 TB in size and it continues to grow. How to put it in order, cluster it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2016-11-09
@g00dv1n

0. Accept that there will be some downtime and you will have to spend a lot of dough.
1. Consider the existing base and decide on the keys for sharding.
2. Prepare your application code for use in the replica.
3. Convert the current base to a replica set .
4. Prepare your application to work with sharding, it should only work with a balancer and in no case with a shard.
5. Convert replica to cluster .
In Monge, each shard contains a replica in itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question