Report this

What is the reason for this report?

Separate droplets for mongoDB and nodejs

Posted on October 26, 2015

Hi,

I’m looking to run a web app hosted on digital ocean. Basically, what I’d like is the following. Server running linux and node.js. MongoDB, with a RESTful interface so both a website and native apps can easily access the data. Storage of static files, including the website files, and a boatload of images (since from what I understand, MongoDB is not as efficient at transmitting binary data, so it’s better to just have the records store links to the images in a cloud storage site).

Is it better to have the server with the static files on one droplet, and the database on another, or just lump them all together? Or if there is an even better alternative I’m all ears!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @BrookDO:

Generally, it’s a good practice to separate your database out to another Droplet from something with static storage, which you could potentially keep on your node server. A lot of the potential lumping together, or parsing apart is dependent on the workload, traffic, and utilization of your Droplet. If you find that the static files are being accessed to the point that it is hindering your Node.js performance, perhaps separate that out into another Droplet too.

View the original comment

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.