Deploying Shared Cluster (3 machines)

46 views
Skip to first unread message

Daniel Pinto

unread,
Mar 29, 2017, 4:17:06 PM3/29/17
to mongodb-user
Hello everyone,

On our production environment, mongod process is using a lot of CPU and RAM due to constant inserts, updates and reads. 

We want to migrate to a shared cluster, but our resources are limited - only 3 machines available. After searching a lot, we were unable to find an answer to our doubt: how should we implement our mongo cluster with 3 machines?

For us, the most important thing is to share CPU/RAM usage among the 3 machines.

Waiting for your help. Thank you!

Best regards,
Daniel Pinto

Rhys Campbell

unread,
Mar 29, 2017, 5:18:59 PM3/29/17
to mongodb-user
Are you confident you've got good indexes and schema optimisation won't get you to where you need? 

Cluster setup-wise I would try first....

Standard 3 node replicaset. Writes to the PRIMARY, divert writes to SECONDARIES. Hopefully that will get you to where you need.

Doc page guides you through the process - https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/

You could also...

2 shard servers, 1 server for config/mongos. You could probably reduce the amount of RAM/CPU for the config/mongos server).
3 shard servers, config/mongos on 1 or more servers. (I don't think I'd tried this setup but it should be possible)

But these setups would not be recommened as they have their obvious drawbacks. I would probably beg/borrow/steal more resources.





Wan Bachtiar

unread,
Apr 11, 2017, 3:23:52 AM4/11/17
to mongodb-user

mongod process is using a lot of CPU and RAM due to constant inserts, updates and reads.

Hi Daniel,

I would recommend to review below resources to optimise your current deployment:

We want to migrate to a shared cluster, but our resources are limited - only 3 machines available

MongoDB allows you to scale your database deployments horizontally and vertically, though extra resources may be required.

Deploying a production sharded cluster on three machines is not recommended, as it will not provide you with Redundancy and Data Availability. See also Operations Checklist and Production Notes.

Depending on your use case, requirements and constraints; I’d suggest to check out MongoDB Atlas.

Regards,

Wan.

Rhys Campbell

unread,
Apr 11, 2017, 4:17:24 AM4/11/17
to mongodb-user
"divert writes to SECONDARIES" should say "divert READS to SECONDARIES"
Reply all
Reply to author
Forward
0 new messages