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

Singleton on cluster mode #103

Open
Wanber opened this issue Jun 5, 2018 · 3 comments
Open

Singleton on cluster mode #103

Wanber opened this issue Jun 5, 2018 · 3 comments

Comments

@Wanber
Copy link

Wanber commented Jun 5, 2018

I have an api gateway running in cluster mode (4), using this lib to cache requests, is there any way to share an instance of lib between the 4 processes?

captura de tela 2018-06-05 as 09 06 23

@TobiasWen
Copy link

I recommend using a redis alternative for that use case.

@mike-tobia
Copy link

mike-tobia commented Oct 26, 2018

I was actually thinking about this earlier - on a high level you could open a file on the master and have a queue of operations manage the cache, writing to the disk (persistence?) in tandem to updating the workers when change happens. It's naive but all the threads can share the same cache that way.

@BCsabaEngine
Copy link

Singleton cannot solve problem. Interprocess communication can solve with outer solution like memcached.

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

4 participants