Monday, 24 April 2017

How to implement shared memory cache in Node JS?

guys,

I'm working on a Node JS project deployed to Azure based on iis-node. At server side I have 8 processes hosting 8 Node JS instances to handle http requests. Currently I use memory-cache NPM module to handle the in-memory cache in each of the process. I want to let 8 processes share the same memory cache. Note: I only want to share the memory cache within the same machine instead of across machines. So Redis or similar cache components are not what I'm looking for. So do you guys have any suggestions / best practices about implementing the shared memory cache no matter it is based on Azure+iis-node? Is node-shared-cache good? Are there any other existing libraries to recommend?

Thanks. Layne.



via Layne Lin

No comments:

Post a Comment