Wednesday, 24 May 2017

Timer APIs in NodeJS [duplicate]

This question already has an answer here:

Would a Nodejs instance scale with enormous usage of setInterval and setTimeout APIs? I have a use case where my NodeJS server needs to keep a timer for some activity going on at the client and if the total time lapsed is above a configurable time, then we push a message. From my understanding, any asynchronous task like ( timers or xhr ) are taken care by a background thread and once the event is done, then it gets pushed to main JS thread. If I create, for instance, 1000 timers at once, would that make my node process slow assuming many threads would be created the NodeJS



via pratyush jha

No comments:

Post a Comment