OPTIONS

Windows Azure

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

Windows Azure is the cloud services operating system that serves as the development, service hosting, and service management environment for the Azure Services Platform. Windows Azure provides developers on-demand compute & storage to create, host and manage scalable and available web applications through Microsoft data centers.

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

Azure VM (Infrastructure-as-a-Service)

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

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.