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

Possibility of syncing cluster adapter across physical servers #1

Open
Interpause opened this issue Oct 3, 2021 · 7 comments
Open
Labels
enhancement New feature or request

Comments

@Interpause
Copy link

Would a combination of Cluster Adapter and inter-server adapters like Redis Adapter be possible? See diagram below.

Untitled drawing

@Interpause
Copy link
Author

I think the easiest way this could be done is by modifying setupPrimary() to further forward inter-process messages using Redis' pub/sub for example. I am currently attempting this.

@darrachequesne
Copy link
Member

So there is only two Redis connections per Server, right? That would be interesting indeed 👍

@Interpause
Copy link
Author

I managed to get it working. I decided to go with the approach of providing setupPrimary an optional param publish that is used to publish events while returning a listener function that is attached as the subscriber. This would allow the user to implement pub/sub with anything they want besides Redis. Will be testing & perhaps optimizing it when I am free this weekend.

@darrachequesne darrachequesne added the enhancement New feature or request label Apr 28, 2022
@alexey-yarmosh
Copy link

Hey @Interpause , maybe you can share some results of your tries? Or at least the draft code you got working. Thanks!

@Interpause
Copy link
Author

Sure, here: main...Interpause:socket.io-cluster-adapter:inter-server-communication

@six-ddc
Copy link

six-ddc commented Sep 12, 2024

Are there any new developments?

@Interpause
Copy link
Author

Are there any new developments?

Well uni started and I can't remember what I was doing here. I might end up trying the same thing again in the future though if a project calls for it.

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

No branches or pull requests

4 participants