Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looking to deploy an existing Mongodb-backed solution to the cloud for a client.

I'm hoping to combine MongoHQ and Azure to use the simplest possible Mongodb deployment together with the simplest possible .Net deployment.

Possible problems I can think of on top of my head includes latency (how much to expect from crossing between clouds) and extra bandwidth usage (this of course depends completely on the app in question).

My question is if anyone here has done anything similar before and knows any pitfalls I should be aware of?

share|improve this question
How many network layers are you going through to hit mongodb? Are we talking, say, a multi-AZ mongo cluster, inside our outside a VPC, etc? Also are you running some equivalent to a mongos process on the Azure servers or...? – Christopher Aug 21 '12 at 13:02
Hi Christopher, the idea was to let MongoHQ run the mongos (they take care of everything) and only use Azure for the web services and web pages part. – Erik I Aug 22 '12 at 18:03
up vote 1 down vote accepted

Aside from latency and bandwidth charges (as you already identified), consider security. While passwords are sent over the wire encrypted, data is not, unless you enable SSL (which requires you to build mongod). I don't know if MongoHQ provides an SSL endpoint for you.

I'm not suggesting your data will necessarily be vulnerable, as I don't know the path it's going to take through the 'net. But... it is something to consider, especially if you're dealing with some type of sensitive data.

share|improve this answer
You could also have a tunnel / VPN between sites. – ceejayoz Aug 21 '12 at 14:50
@David: Thanks! This is exactly the kind of information I'm looking for! – Erik I Aug 22 '12 at 16:39

I know of several implementations that use .Net (primarily the C# driver) on Windows and then have MongoDB running on Linux on the backend without a problem. The Windows platform is supported of course, but if you have the option I would deploy the mongod instances on Linux instead - it is by far the more popular and best tested solution.

There should be no problem mixing PHP and .Net drivers per se - and I have seen multiple drivers used without issue. However, I would recommend being careful about connection management - the PHP driver code in this area is being rewritten as we speak but in the meantime, the non-thread safe forking nature of PHP can cause a lot of connections to build up very quickly. Adding in another driver (on the .Net side) and you will need to pay particular attention to connection pool settings, ulimits on Linux etc.

It's hard to give a very specific question to a general question such as this, if you have specifics to add I can try answering them.

share|improve this answer
Hi, and thanks for your answer. My question was more less about the mix of languages and more about the mix of clouds : ) I can also confirm the mix of languages works. Will edit my question to clarify. – Erik I Aug 21 '12 at 10:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.