Microsoft Azure

MongoDB on Azure brings the power of the leading next-generation database to Microsoft’s flexible, open, and scalable cloud.

Microsoft Azure is an open and flexible cloud platform that enables you to quickly build, deploy, and manage applications across a global network of Microsoft-managed datacenters. You can build applications using any language, tool, or framework. You can also integrate your public cloud applications with your existing IT environment.

Together, MongoDB and Azure provide customers the tools to build limitlessly scalable applications in the cloud.

MongoDB’s Service on Azure Available in the Azure Store

MongoDB’s first fully-managed, highly available MongoDB-Enterprise-as-a-service offering is available as an Add-On in the Microsoft Azure Store. The service runs MongoDB Enterprise and makes it easier to deploy MongoDB applications in the cloud by offering replication, monitoring, and support from MongoDB, Inc. Backup is provided by MongoDB Management Service (MMS), allowing for point-in-time recovery of MongoDB deployments.

Other Deployment Options

Users interested in deploying MongoDB directly on Azure can do so using Azure VM (Azure Infrastructure-as-a-Service) on Linux or Windows, or Azure Worker Roles (Azure Platform-as-a-Service) on Windows.


Users deploying MongoDB on Azure may be interested in the following presentations:

Deployment Recommendations

For all MongoDB deployments using Azure, you must mount volume that hosts the mongod instance’s dbPath with the Host Cache Preference READ/WRITE.

This applies to all Azure deployments, using any guest operating system.

If your volumes have inappropriate cache settings, MongoDB may eventually shut down with the following error:

[DataFileSync] FlushViewOfFile for <data file> failed with error 1 ...
[DataFileSync] Fatal Assertion 16387

These shut downs do not produce data loss if when storage.journal.enabled is set to true. You can safely restart mongod at any time following this event.

The performance characteristics of MongoDB may change with READ/WRITE caching enabled.

The TCP keepalive on the Azure load balancer is 240 seconds by default, which can cause it to silently drop connections if the TCP keepalive on your Azure systems is greater than this value. You should set tcp_keepalive_time to 120 to ameliorate this problem.

On Linux systems you can use the following operation to check the value of tcp_keepalive_time:

cat /proc/sys/net/ipv4/tcp_keepalive_time

The value is measured in seconds. You can change the tcp_keepalive_time value with the following operation:

echo <value> > /proc/sys/net/ipv4/tcp_keepalive_time

For Windows systems, issue the following command to view the keep alive setting:

reg query HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime

The registry value is not present by default. The system default used if the value is absent, is 7200000 milliseconds, or 0x6ddd00 in hexadecimal. To set a shorter keep alive period use the following invocation in an Administrator Command Prompt, where <value> is expressed in hexadecimal (e.g. 0x0124c0 is 120000):

reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ /v KeepAliveTime /d <value>

Windows users should consider the Windows Server Technet Article on KeepAliveTime for more information on setting keep alive for MongoDB deployments on Windows systems.