On Wed, Jun 13, 2012 at 2:06 AM, Andrew Finnell <[email protected]> wrote: > Isolates was my last saving grace while doing NodeJS research. I am > attempting to do a proof of concept for a product I am working on. > > Scenario: > > 10,000 distinct'ish workers on a single machine. As it stands I'd need to > spawn 10,000 separate nodejs instances which amounts to about 300 gigs of > memory for a very simple task. I was hoping that Isolates or something > similar that could share common memory in some fashion would of alleviated > this problem. I could maybe have 200 nodejs clusters that each run 50 > internal instances. I do not need to share variables etc across threads or > processes. I am very appreciate and understanding of the mailbox/message > model for communication between processes. I just need to reduce the > handle/memory requirements to something more manageable. > > Of all the workers, the idea is that a single one can go down and I still > have all the other ones working. In a typical Java implementation one might > create a cluster of a few VM nodes 3-5. Even in this scenario 1 node going > down would bring down a substantial number of workers and the memory > overhead of running a JVM is too high. > > In a little more detail, lets say I wanted to create a management framework > that allowed developers to write their own nodejs applications that could > run in the management framework. I might need to spawn 400 instances of App > A, 100 of App B, 90 or App C, etc. The separate instances of the Apps do not > share state nor need to. The key issue I am facing is that these app's are > written independently of each other, thus it makes it difficult to run them > all in the same event loop. Too many bad things can happen with differently > written apps. > > > Any suggestions? I have been looking into Vert.x as an alternative.
Isolates wouldn't have helped you. Each isolate has a 5-10 MB memory footprint so 10,000 isolates need at least 50 GB of memory. Never mind that all the context switching will likely kill you. Java or Erlang may work better for you. It's certainly possible to fire up 10K Java threads but you probably need to tweak the JVM a little (decrease stack size, that sort of thing.) -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
