简体   繁体   中英

Understanding resource usage with node.js, express and nedb

I have created a very simple node.js express application.

It loads about 1 gig of JSON data into a memoryonly nedb database.

So I'm wondering what happens when I try to run this in production?

I don't know how express is deployed but presumably using some sort of web server that executes multiple express processes?

I am wondering if this means that each process will have its own one gigabyte nedb database in memory?

Is there a way to configure such that the one nedb database is shared amongst all the node.js express processes?


it's might not the answer that you expected but it might help. to observe how much you application use the resources you can use https://keymetrics.io
it also provide a nodejs module named pm2 that supports clustering for nodejs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM