4 ms·
Generally Node has been targeted at server side projects to date (i.e. building web APIs/etc). Stand it up register a listener on a port, and start servicing r
by mainguy 11y ago
Generally Node has been targeted at server side projects to date (i.e. building web APIs/etc). Stand it up register a listener on a port, and start servicing requests.
- JoeAltmaier 11y agoCurious: isn't Node single-threaded? How can it scale on a server i.e. on a beefy server with 64 hyperthreads, now can Node capitalize on the available horsepower?
- Rezo 11y agoNode includes the cluster module to create child processes that all share the same server port, allowing you to take advantage of all available cores. You can also run multiple node processes on the same machine (on multiple ports) and use something like NGinx to loadbalance between them. You can use this to get zero-downtime upgrades on a single machine.
- frantzmiccoli 11y agoPreviously you could launched multiple instance of your program. Today you can use https://nodejs.org/api/cluster.html https://nodejs.org/api/cluster.html and leverage all those sweet cores on your server. You can multiprocess but not multithread.