Search code examples
node.jscpu-usagelong-polling

Using Node.js for long polling along with Apache


I read that Node.js is more CPU intensive than apache. However if I serve only the long polling calls using node.js and the rest using apache, does it still take up as much CPU or will it prove to be beneficial.

I intend to try this out myself but it would be helpful if someone has already done this and has opinions. Thanks.


Solution

  • I read that Node.js is more CPU intensive than apache.

    Where did you read that? I believe the opposite is true.

    However if I serve only the long polling calls using node.js and the rest using apache, does it still take up as much CPU or will it prove to be beneficial.

    The best part of node.js is that is very efficient doing things like long-polling. While Apache/PHP IO blocks. node.js does not have blocking IO.