DEV Community

brown97 loong
brown97 loong

Posted on

Should I upgrade the server configuration?

I have a 4-core, 4GB RAM server currently running a Next.js project. I've installed Sharp and am currently using pm2 to run the program. I have two questions: 1. Can I only use pm2 to run the program? 2. If concurrency increases, can my server handle the load?

Top comments (1)

Collapse
 
apogeewatcher profile image
Apogee Watcher

1) Yes, pm2 is fine for running Next.js in production.
2) Before upgrading, check where the bottleneck is.
Run a load test (e.g. k6 or Artillery) and watch CPU, memory, and TTFB. With Sharp doing image work, CPU matters more than RAM. If you see high CPU or TTFB climbing under load, that’s when to consider more cores or moving Sharp to a CDN/edge. What’s your current TTFB under normal load?