Hi community,

I’m looking to build a web application using the MEAN stack, and had some general questions around deployment and scalability.

The front-end will be used primarily for data retrieval and some manipulations, but a lot of the data is pulled in externally from third party connections. I would be writing services within Express to periodically retrieve the data, save to the database, which is then presented on the front-end (Angular).

In terms of scalability, I want to explore tools like Docker to, and also want to know about load balancing the application I build.

Some general questions I have:

  • Is it typically best practice to deploy the stack to different servers? For instance, Angular would reside on one server, express/node on another, and mongo on compass for example?
  • How would you deploy a front-end so that it serves different regions with low downtime and latency? For instance, if I want to serve users in California, Texas, and New York, would I deploy the front-end code to 3 different servers and have express listen to these environments for incoming requests? Do the api layer (express) and database (mongo) typically get scaled as well?
  • If you know about docker, typically what would happen with implementing security out of the box?

Thanks!

submitted by /u/guru223
[link] [comments]