Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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
share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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