Friday, 21 April 2017

Node.js and Redis. If I have to get a huge redis dataset, is it blocking in Node.js or asynchronous?

So I have a node.js server that gets hit over 100 times every second. And every 5 minutes I need to get a huge set of data from Redis. Would this operation block the main event loop for Node.js? Or would I make the call to Redis, and if it's async when the Redis operation is complete then it would re-enter the event loop? Is that how it works? Pretty much I don't want this big Redis call to block anyone from calling my server. How can I do this? Do I need a worker? Or is the Redis operation async?



via PythonNoobile

No comments:

Post a Comment