Closed slmyers closed 5 years ago
I'm not completely clear, to be honest. I think one issue you may run into is that the default number of listeners that can be added before warnings are printed is 10: https://nodejs.org/api/events.html#events_eventemitter_defaultmaxlisteners
Another issue is that (https://nodejs.org/api/events.html#events_events)
When the EventEmitter object emits an event, all of the functions attached to that specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded.
So EventEmitter may not be suited for instances where you serve a large number of connections listening on a particular event.
Thanks again for the help. I'm closing this issue to avoid clutter.
Can someone please ELI5 (or give me hints on where to look, currently looking at
Node EventEmitter
as issue) why the default implementation "doesn't scale beyond a couple connections" and how I could make it scale better (although to a still relatively small amount) on a single server. Please and thank you.context: I work on an app that is shipped to run on client premises which are each smaller businesses without many concurrent users.