Answer the question
In order to leave comments, you need to log in
Bulletproof Node.JS and MongoDB?
And tell us, experienced Node.JS programmers, how do you solve problems with the operation of your web servers on Node.JS?
How do you solve the issue of catching errors in production?
How do you solve the MongoDB backup issue?
How do you deal with Node.JS and MongoDB memory eating issue?
How do you solve the issue with restarting Node.JS after reboot?
Answer the question
In order to leave comments, you need to log in
I'm just a beginner, but here's what I know:
1. Raven and storing everything in Sentry . For myself, I make it easier and redirect the output inside the script to a log file.
2. One of the main advantages of MongoDB - delayed slave is used .
3. I haven't encountered it yet, but I can assume that eating memory can be solved only in two ways - writing high-quality code and restarting applications when there is not enough memory on the server. It is natural to provide for an appropriate architecture, for example, two simultaneously running Node.js instances and a balancer between them. Restart them one by one. With mongo, it’s about the same here, you can make a cluster on mongos. Good courses here. From practice, one good instance of 32-64GB RAM is enough if your database is 20 GB. Monga really eats memory in buckets. But he also uses it effectively. Many problems are solved by prudent indexing and the understanding that all data with indexes must fit in memory in order to be fast.
4. Restart is done like this . Plus, there is also a monit daemon that monitors running processes. Also, if you google, you will find 1001 ways of Continuous Integration . This is when the deployment and restart of servers occurs automatically.
I guess the pros will correct me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question