Editor’s Note: Today’s post comes from Sridhar Nanjundeswaran, Software Engineer at 10gen. 10gen develops MongoDB, and offers production support, training, and consulting for the open source database.
We at 10gen are excited about our ongoing collaboration with Microsoft. We are actively leveraging new features in Windows Azure to ensure our common customers using MongoDB on Windows Azure have access to the latest features and the best possible experience.
In early June, Microsoft announced the preview version of Windows Azure Virtual Machines, which enables customers to deploy and run Windows and Linux instances on Windows Azure. This provides more control over actual instances as opposed to using Worker Roles. Additionally, this is the paradigm that is most familiar to users who run instances in their own private clouds or on other public clouds. In conjunction with Windows Azure’s release, 10gen and Microsoft are now delivering the MongoDB Installer for Windows Azure.
The MongoDB Installer for Windows Azure automates the process of creating instances on Windows Azure, deploying MongoDB, opening up relevant ports, and configuring a replica set. The installer currently works when used on a Windows machine, and can be used to deploy MongoDB replica sets to Virtual Machines on Windows Azure. Additionally, the installer uses the instance OS drive to store MongoDB data, which limits storage and performance. As such, we recommend that customers only use the installer for experimental purposes at this stage.
There are also tutorials that walk users through how to deploy a single standalone MongoDB server to Windows Azure Virtual Machines for Windows 2008 R2 Server and CentOS. In both cases, by using Windows Azure data disks, this implementation provides data safety given the persistent nature of disks, which allows the data to survive instance crashes or reboots.
Furthermore, Windows Azure’s triple-replication of the data guards against storage corruption. Neither of these solutions, however, takes advantage of MongoDB’s high-availability features. To deploy MongoDB to be highly available, one can leverage MongoDB replica sets; more information on this high-availability feature can be found here.
Finally, customers who would like to deploy MongoDB replica sets to CentOS VMs can follow these basic steps:
- Sign up for the Windows Azure VM preview feature
- Create the required number of VM instances
- Attach disks and format
- Configure the ports to allow remote shell and mongodb access
- Install mongodb and launch
- Configure the replica set
Detailed steps for this procedure are outlined in the tutorial, “Deploying MongoDB Replica Sets to Linux on Windows Azure.”