MongoDB Resources and Scaling

MongoDB Resource Scaling

Vertical Scaling

The vertical scaling option allows for memory and storage to be manually added to each database node. Vertical scaling is also the dimension that Compose Auto-scaling operates in.

Mongo Routers

All MongoDB deployments support adding additional routers, as well as adding additional memory to routers, to handle larger connection and query loads.

Adding Memory and Storage to MongoDB Nodes

The Deployment Resources view of your MongoDB deployment shows a list of configured nodes, routers, and config servers. Under Shards there is the replica set ID for each shard, and within each shard each row displays the name, role, location, and IP address of the individual nodes.


The list of deployment resources.

The data nodes are the primary and secondary in the replica set, the arbiter ensures the primary/secondary relationship, and the (data)backup node replicates primary and secondary to make fast no-stop backups for the deployment. They are all scaled in the same way.

To add or reduce memory allocated to a MongoDB deployment, click Scale in the lower right of the Shards panel. The Scale Shards view will open:


The Scale Shards view.

By adjusting the slider, you can raise or lower the storage allocated to the MongoDB shards. The memory allocation is 10:1 with the selected memory allocation. When the slider is moved, the view will update with the new cost per month for the deployment. Note that the slider will not let you move to a position that is less than your currently used storage.


Scaling shards vertically.

Clicking Confirm triggers the rescaling of the deployment.

Adding Memory to Mongo Routers

MongoDB is configured with mongos router capsules to manage and handle incoming connections. These can also be scaled to allow them to handle traffic more efficiently. Mongos routers are scaled entirely in memory. The Mongo Routers panel contains the details and scaling controls.


List of Mongo Routers.

Clicking Scale takes you to a slider where you can increase or decrease the memory allocated to the mongos routers and see the projected monthly cost of those changes. Clicking Confirm puts those changes in place.

Adding Additional Mongo Routers

The Security view includes a list of the currently configured Mongo routers.


List of portals in the Security view.

To add additional routers, click Add Mongo router. A confirmation will appear: click Create to start provisioning the router. When the process is complete, the Deployment Overview will be updated to show the new router's connection strings.


Connection info on the Deployment Overview.

Config Servers

The Resources page also lists other capsules that take part in running the deployment. They are listed under Config Servers and cannot be scaled.


List of Config Servers on the Resources page.

Scaling Down

MongoDB does not automatically free storage from your deployment, instead it will keep it around for future storage needs should they arise. Scaling down is possible with a couple of extra steps found on the Scaling Down MongoDB page.

Removing Shards

If you wish to remove a shard entirely, please contact support.

Still Need Help?

If this article didn't solve things, summon a human and get some help!