Multiple servers or all on one server?

I have a Rails application that uses MySQL, MongoDB, NodeJS (and SocketIO). Right now the app (everything) is being hosted inside 1 window. I would like to know what I should do when the number of users grows. What factors should I take into account to determine if I need to place a single item in a different field (e.g. MySQL, Node, Mongo in each separate window). Should I just make one more box? Is there a better way I can go with?

If you guys can provide me with a link, guides, research on this topic. Please do. I am a super noob at server deployment and configuration.

+3


source to share


2 answers


The short answer is to move everything into your box. Longer answer: it depends on the use of your application.

I recommend that you use Nagios or similar to track your application's resource usage - that is, how much CPU and RAM your services are using. When everyone starts out with too many resources (and the page load speed is negatively affected), move that to its own box.



Then continue to monitor this field, increase to a minimum if necessary or delineate.

a highly scalable blog is good for reading what other people have done.

+3


source


We ran into this dilemma at work recently and found that just switching to a more powerful single box is enough and will give us the opportunity to grow further 3-4 times.

The most important thing is to identify your potential bottlenecks.



In our case, there were 2 bottlenecks. Disk I / O and the database's ability to use memory.

On our new server, we had an array of hard drives configured to maximize disk I / O, and we updated our database software to allow it to use more memory. In fact, the DBMS now stores the entire database in memory and only performs writes to disk as needed. This has greatly improved performance.

+4


source







All Articles