MongoDB is one of the most popular NoSQL databases around with a JSON/BSON document store and rich query and aggregation frameworks accessible by a wide range of application platforms and languages. Compose gives you access to high-availability, auto-scaling, production quality multi-node MongoDB deployments with just a click.
MongoDB for All is a general introduction to MongoDB on Compose.
Are you wondering what you'll get, or can get, with a Compose MongoDB deployment? Want to know what you'll need to do to manage it? Check out some of the implementation features and details down in MongoDB for Ops and Admins.
Just deployed MongoDB and want to get coding with it? Developing an application or want to try a new stack? Then see the MongoDB for Developers section for resources on how to connect from different languages, command line tools and more information to get you started.
When deployed on Compose, MongoDB comes with these standard Compose features.
- Automatically scaling server stack that scales RAM, CPU, and I/O as your MongoDB data grows.
- Daily, weekly, monthly, and on-demand backups.
- Metrics displayed in the Compose UI
- Deploy, manage, backup, and otherwise automate database tasks through The Compose API.
- Guaranteed resources per deployment.
- Daily logs available for download.
Compose deployments of MongoDB also come with a number of MongoDB specific features:
- Data Browser For MongoDB.
- An optional add-on for real-time log access.
- The ability to forward rich metrics to services with an optional add-on.
- Optional Access to the Oplog.
- Optional WiredTiger storage engine.
- SSL connections by default.
- Prices start from $31/mo for a 1GB MMAPv1 deployment and $18/mo per extra gigabyte and from $133/mo for a 4GB WiredTiger deployment adn $30/mo per extra gigabyte.
Compose delivers MongoDB in a three data node, single-sharded configuration, with two mongos/haproxy routers handling incoming SSL connections. One data node is assigned to backup and enables no-stop backups.
With MMAPv1, each node starts with 1GB storage and 102 MB of memory in a 10:1 memory/storage ratio and each of the two routers has 64MB of memory.
With WiredTiger, we configure the system to have more RAM available. That means each node starts with 4GB of storage and 1GB of memory in a 4:1 memory/storage ratio.
Both configurations have additional configsvr nodes and an arbiter node to handle system and deployment administration.
For standard Compose Hosted deployments automatic vertical scaling occurs as your data set grows. You can also manually scale up your portals and MongoDB deployment from the deployment's Resources panel. The memory/storage ratio is maintained, so by increasing the disk allocated to the deployment, you increase the RAM allocated. Additionally, horizontal scaling allows for additional Mongo routers to be added to your deployment.
For more information, see the MongoDB Resources and Scaling page.
See Compose Datacenter Availability for current location availability.
Compose deployments are billed on hourly basis and grouped into a single monthly billing cycle. This means that any scaling or add-on usage will be charged from when the new resource was provisioned; not just for the month.
The basic MMAPv1 deployment set up is $31/month. Depending on which scaling and add-ons options you choose, the cost will increase. For example, if you wish to add extra storage and RAM, it is billed at an additional $18/month per unit of 1GB storage/102MB memory, so an additional 2GB storage/204MB memory will cost an additional $36/month.
The basic WiredTiger deployment set up is $133/month. Depending on which scaling and add-ons options you choose, the cost will increase. For example, if you wish to add extra storage and RAM, it is billed at an additional $30/month per unit of 1GB storage/256MB memory, so an additional 2GB storage/512MB memory will cost an additional $60/month.
General billing information, answers, and details can be found in the Billing FAQ
In the standard configuration for MongoDB on Compose, you get a single-shard with three nodes in a replica-set. Mongo will push all write operations on to the primary data node and then propagate them (via the oplog) to the secondary data node on the shard. Should the primary node fail, the secondary will be promoted to primary providing fault-tolerance for your databases. The Mongo routers are responsible for dictating any fail-over, along with load-balancing operations to any of the nodes in the cluster. Three configuration servers exist to help with these operations.
HAProxy has been added into the Mongo routers, providing an avenue for secure TLS/SSL connections. By moving the proxy into the mongos router capsule, you will be able to control whitelist IP address filtering and other security access features. TLS/SSL connections are backed by Let's Encrypt.
MongoDB with WiredTiger has a different resource profile. The compression and caching features mean that disk usage is reduced but at the cost of more CPU and RAM – MongoDB Inc recommend starting with 1GB of RAM. WiredTiger has shown, in use, to be more RAM consuming so we offer it with the recommended allotment.
We start our WiredTiger offering with 4GB of storage and 1GB of RAM. This moves the initial deployment cost to $133. Each extra gigabyte of storage includes 256MB of RAM to support it and costs $30 to scale instead of the additional $18.
We give you the choice of which storage engine you want, but be aware that we do not support swapping storage engines without a complete backup and restore to a new deployment. WiredTiger might not be best for you and your use-case - if you have a smaller dataset, it's best to do your research and make sure you're going to be benefiting from what the engine offers.
Oplog access is useful for a number of MongoDB based applications including continuous synchronization to other databases and for scaling up platforms like Meteor. Oplog access is now available as an add-on through the Compose console. More implementation and configuration details for oplog add-on can be found on the MongoDB Add-ons page.
If you want to connect to your databases from your local system, you will need the
mongo command installed, which is available by installing MongoDB locally. Find packages directly from MongoDB. You will want to make sure you have same version as is running in your Compose deployment, as well as having the SSL options enabled. There are installation and usage instructions over on the MongoDB Tools page.
The Overview panel of the Compose UI provides the basic information you need to get connected to your databases. In the section Connection info you will find Connection Strings for your application and the Command line for connecting from your local system or development environment. Credentials for accessing your databases can be managed by adding users to your admin database. The Connecting to MongoDB page should get you started, and check out Debugging MongoDB Connections if you are having trouble.
The full list of documentation for MongoDB is in the sidebar, in addition to all things Compose.
If this article didn't solve things, summon a human and get some help!
Updated 2 years ago