I was hoping to avoid having to spawn individual nodejs processes to
avoid the overhead. It would be great if it was possible somehow to
have a 'pool' of nodejs processes running that scale up and down
automatically based on load, but I haven't seen any way to do this
within nodejs or with an external tool.
Of course I could write something myself, but as soon as I go down the
path of hacking nodejs for this, I have to keep it updated with every
nodejs update..
On Aug 6, 8:53 am, Mark Hahn <
m...@boutiquing.com> wrote:
> May I suggest child processes instead? I wrote an app that spawned a lot of
> processes running separate copies of node and it worked well. I passed
> request to them by creating a small version that only had the needed
> properties and then serializing it to send over stdin. I wrote my own
> versions of result.writehead, result.write, and result.end that ran in the
> child process. These routines just serialized the result data to send back
> over stdout.
>
> Of course the child node processes were *very* isolated, much better than a
> sandbox.
>