Is the node a good choice for database driven websites? I understand the performance advantage in real-time scenarios and applications. But does it offer the same performance advantage for classic, database driven CMS websites, compared to nginx + php-fpm.
Node is good choice for database driven websites given that you have database binding written in non-blocking way. Most used database servers now have nodejs bindings written in non-blocking way.
For example, PHP with apache. It creates a thread per request. When doing IO with database thread is in blocking state. It means http server can't do anything with that request till IO completes, 40,000,000 cycles. This is wrong way of doing IO. While in nodeJS, if db binding is written in non-blocking way, binding is doing IO in thread pool and node event loop is listening for events.
IO latency (in CPU cycles)
L1: < 10 cycles
L2: < 20 cycles
RAM: ~300 cycles
Disc: 40,000,000 cycles
Network: 240,000,000 cycles