I want to take a NodeJS web app online. Using Express.js... How do you decide on factors (using digital ocean, as an instance) like memory, cores, SSD Disk space, and Transfer; so I don't have scaling nightmares in the future?
It all depends on the visitors you are expecting.
For starters 5$ , 512Mb RAM server is enough, I'm using that for one of my project on express . The application is currently receiving 20-30 real-time and approx 5-8k users daily .. and on this load the CPU hardly goes above 5-8% and same for memory consumption.
You can easily handle 200-400 realtime on 512Mb RAM server.
So, i think now you have pretty good idea how much memory / cpu a node application can consume.
PS : On Digital Ocean i think you can scale the infrastructure without effecting the application itself.
David Fekke
I am a reformed .NET developer turned iOS, Android and Node.js developer. I also am an IoT hobbyist.
I try to start with the easiest option first. If I host a Node app in Heroku or as an Azure app service, I go that route. If not, you can configure Docker and Kubernetes with AWS or Azure.