I'm running a NestJS app on a VPS server along with a PostgreSQL database. I want to use cluster mode for my NestJS app to fully harness my CPU power. However, I've read that the recommended number of Node.js instances should match the number of CPU cores. Given that most of my workload is database-heavy, I'm unsure if that's the best approach. Are there ways to monitor the workload between my NestJS app and the database?
1 Answer
To figure out the optimal number of Node.js instances, consider running stress tests. This helps gauge how your application and database perform under load, which is crucial especially if you're planning to sell server-side software. Monitoring your resources as you conduct these tests is key.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically