Deploying applications in a multi-server environment

In this section, we are going to learn how to deploy our app and scale it out vertically. We are going to use only two servers this time: one for the Reverse Proxy/Load Balancer and another for the node application. We can scale this out by adding more node application servers and database servers, and by referencing it in the load balancer.

For this section's sake, we going to deploy our app in two servers: one server containing Nginx that serves as the load balancer and another server that contains the NodeJS app and the database.

Deploying applications in a multi-server environment

Figure 6: Two-server deployment

Setting up the app server – NodeJS ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.