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.
All MongoDB deployments support adding additional routers, as well as adding additional memory to routers, to handle larger connection and query loads.
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 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:
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.
Clicking Confirm triggers the rescaling of the deployment.
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.
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.
The Security view includes a list of the currently configured Mongo routers.
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.
The Resources page also lists other capsules that take part in running the deployment. They are listed under Config Servers and cannot be scaled.
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.
If you wish to remove a shard entirely, please contact support.
If this article didn't solve things, summon a human and get some help!
Updated 2 years ago