I'm going to be setting up a sharded + replicated mongo cluster, with application software servers co-located with mongod instances-- so that odds are a request is being processed on the same hardware server where the necessary data lives.

But it's a bit of a drag how mongo secondary replica servers are almost dead weight compute-resources, since they can only handle reads... and must forward all writes to their primary. Therefore, there's almost no point to co-locate application servers with secondary replicas... only primaries.

Therefore I've considered a setup where each server is a shard, and also a replica for a neighboring shard. That way, no server is dead weight.

Are there any concerns with this architecture, from anyone who has tried it?

1 Answer 1


Normally network speed (read/write) is not bottleneck, so application servers can be separated from mongod primaries.

If you plan to make cluster and put application to primaries so that application writes only that shard where it's data lies it's going to be a little bit tricky to select right sharding key.

Only concern is the memory, normally you DON'T put any applications to mongod nodes, because mongod uses ALL the memory, eventually! Atleast at situation where your data+indexes are bigger than free memory (at start of machine).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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