Report this

What is the reason for this report?

Horizontal scaling with MongoDB and Nodejs

Posted on February 14, 2019

Hello,

I have a web application running on a single droplet, powered by Node.js + MongoDB + nginx on the same machine. Application traffic is increasing and I would like to scale my servers, so it will have 3 servers, one for MongoDB, second and third would be web servers.

My question is: how do I setup my mongodb server? Can I make it accessible only from my web servers, or it is possible to create some sort of “local network” on Digital Ocean, so only 1 IP (load balancer) could be seen from the Internet.

Also, any tips on making this setup are welcomed.

Thanks in advance.

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.