Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared memory caching with cluster mode #421

Open
asvyazhin opened this issue Jan 29, 2024 · 1 comment
Open

Shared memory caching with cluster mode #421

asvyazhin opened this issue Jan 29, 2024 · 1 comment

Comments

@asvyazhin
Copy link

Thank you for this awesome library. I really like the idea about LRU caching! I would like to know is it possible to have a single (shared) memory cache when nodejs app is running in cluster mode – each available core runs a separate app instance?

@simoneb
Copy link
Member

simoneb commented Jan 29, 2024

I don't think this scenario was ever considered, and clearly it wouldn't be straightforward to implement either, because with Node.js clustering you would effectively have process isolation, meaning that passing of state would require an explicit approach, making it considerably inconvenient. In this specific case, my feeling is that the cost of doing anything like this would largely outweigh any benefit you may get from a shared cache.

We're open to ideas and proposals though, maybe you have something specific in mind that I haven't considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants