-1

I am implementing a Job queueing system that should be easy to scale (by adding more servers) and has to handle hundreds to thousands of simultaneous job processes at any one time. The load can change drastically over time.

Each job involve executing an instance of a headless browser (Phantom/Zombie) for about 1 minute. Within the 1 minute, most of it is idling time without any significant CPU processing involved.

Question: Will Node's event loop help in reducing the amount of resources used in this scenario, since there is considerable waiting on Network IO (did I get this right?) while a PHP/nginx implementation will start a new thread for each job and sleep the thread until the job is done 1 minute later. Or is there not really any strong reasons for choosing either one?

4

1 回答 1

0

It does not really matter. Your job dispatcher/scheduler will not be the bottleneck, most of your CPU time will be spent on the actual headless browser instance.

于 2012-12-30T17:18:01.907 回答