4 ms·
I know that the parent replied already, but I want add that using node for static content is a good idea. I/O is what Node excels at. As long as you use the non
by virmundi 12y ago
I know that the parent replied already, but I want add that using node for static content is a good idea. I/O is what Node excels at. As long as you use the non-blocking API to load content, you should get good throughput. What Node is bad at is processing dynamic things. If your templates are CPU intensive, you'll block Node.
This is why I'm, to this day, confused about building whole websites on Node. Dynamic, templated web sites are computation intensive (without result caching). Sure you can have N-Nodes running for N cores. This will minimize blocking. I/O for DB is time intensive so Node will pickup other workloads while it waits. So everything averages out, but it still an interesting thing often overlooked.