0

Basically we need to have a replication, a minimal setup.

Primary
- Slave 1
- Slave 2

Is it possible in the future we Shared it? What would be the setup?

Is it going to have shared on Slaves like this?

Primary
- Slave 1 (Shared A)
  - Primary
  - Secondary
- Slave 1 (Shared A)
  - Primary
  - Secondary
0

This can definitely work. When you shard, you will need to add nodes equal to your replica count. So it should look like this:

Shard0
  - Primary
  - Secondary
  - Secondary
Shard1
  - Primary
  - Secondary
  - Secondary

Or put another way, you shard on replica-sets. If your unsharded setup has 3 servers, the 2 shard version should have 6.

0

I'm not sure I understand your question. But yes, sharding and replication work together.

http://docs.mongodb.org/manual/faq/sharding/#how-does-sharding-work-with-replication

Anyway, the master-slave replication approach has been discouraged for some time.

http://docs.mongodb.org/manual/core/master-slave/

The docs are pretty good, take a look at the replication section.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.