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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.