javascript - Node.js: bottlenecks when registering very large number of listeners and callbacks? -
javascript - Node.js: bottlenecks when registering very large number of listeners and callbacks? -
i'm working on application single server might receive many 100,000 requests results of same, slow-executing (up 5s) process. means eventemitter
crap-load of listeners , callbacks triggered @ once. kinds of things need out here - running out of memory issue?
more implementation details, if that's relevant: going utilize cluster, memcached cache results , locking (because 1 request handler needs work on each unique request @ time, while other 99,999 wait complete), inter-process communication between forks trigger necessary events across cluster. in reality we'll end 4 node processes each 25,000 listeners waiting on distributed event.
this seems kind of thing node.js excels at, , don't think there thundering herd issue, each request isn't process woken, consume resources, , 1 set sleep again. instead, when event triggered, other 99,999 requests resolve one-by-one in orderly fashion in event loop on each node process.
i'm working on now, i'll post results of stress tests go along, figured i'd inquire @ start kind of bottlenecks may run here.
javascript node.js events callback cluster-computing
Comments
Post a Comment