Using MongoLab to manage your MongoDb instances
If you have been looking at getting into using document-oriented storage, you have probably looked at the variety of NoSQL offerings such as CloudDB, Elasticsearch, or MongoDB. These databases are built for scalability, performance, and high availability, tailored for gathering large quantities of data in a reliable manner.
My personal preference is MongoDB, as the support for it is very solid and the C# driver is great for the .NET applications I build. Recently, while working on a pet project, I started playing around with MongoLab to host a cloud storage of the data.
Getting started for free
I spun up a new Experimental database, capacity for 500 MB of storage, all at no cost. I could even pick my favoured cloud provider for the database. Production-level usage does have some significant costs (starting at $89/mo), depending on the quality of the server you want to deploy.
In contrast, the single-node development packages have two very cheap options, including a free option, with different storage capacity options.
When creating the new database, you can choose the version of MongoDB to deploy, but also get an option for ‘experimental’ which allows you to use the latest and greatest version of MongoDB. This version of MongoDB may not be stable, but this option is useful if you plan on building something for an upcoming stable release of MongoDB, or if you require features that are only available in the latest version.
Connecting to the database
From within MongoLab, you can drill into any one of your created databases and extract the connection information for that database. These connections are available for shell or for driver, and look something like this:
To connect using the shell:
mongo ds012345.mongolab.com:51997/gametime -u <dbuser> -p <dbpassword>To connect using a driver via the standard URI:
Viewing your collections
Within the web interface, you can also browse through your various collections and view statistics on the collections. These interfaces also allow for renaming collections, deleting them, and drilling in to view documents.
The document view supports searching, paging, deleting, and viewing the serialized data stored within the collection. This is incredibly helpful when starting development if you haven’t had time to build up your interface yet. In my case, this was really useful as I was building a data aggregation tool so most of my business logic was just collecting data and storing it. Without a UI to view the data that had been collected, the MongoLab interface was very helpful for confirming the data had been stored in the format I needed.
The MongoLab interface also supports managing backup plans and users, and provides tools for importing and exporting binary, JSON, and CSV. There’s even some basic commands you can run (like ping, or whatsmyuri), though I haven’t found much use for these.
Right now, the best use of MongoLab for me is for experimentation and starting up small projects. The production hosting looks like a good option, if you’ve got the budget for the monthly costs, although I’d recommend looking around to compare pricing on the cloud hosting. MongoLab does make it easy, though!
Have you had any experience with MongoLab, especially the production hosting? I’d love to hear about it!