> I've written and operated Node-based backends at scale.
I'm interested in producing fullstack typesafe web projects using typescript on both backend and frontend.
My question is how do you scale nodejs since it is single-threaded? Say I need 10k concurrent connections. These connections doesn't have to be all hammering the system at once but I need to accept 10k connections and perform something like 2k requests/s.
How do I approach this? One server with clustered nodejs? pm2?
I ask because there are a ton of outdated info on how to scale nodejs.
Some rudimentary benchmarking with clustered or pm2 nodejs tells me that 95 response times go from 30ms to 1000ms once I hammer the server. Whereas Go and C# keep it under 100ms without any effort or extra tooling, just using standard library.