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

Users online with multiple servers or containers ... works fine? #7

Open
felipemarques opened this issue Aug 30, 2018 · 1 comment
Open

Comments

@felipemarques
Copy link

In your code... the number of users conected on the socket, are calculated based in users connect on socket connection... this is correct ? Please tell me if i am wrong, but, in your code , when this project is deployed to a cluster with a load balancer... using sticky sessions, the total number of users conected, not working properly, right ?

The correct way, would be get the total number of users connected from dynamodb or redis, for example, no?

Thankyou! (sorry my bad english)

@jonigl
Copy link

jonigl commented May 3, 2019

Yes, @felipemarques you are right, take a look at this branch: https://github.com/nathanpeck/socket.io-chat-fargate/tree/4-scaling here, he used a lib called presence.js. It is used to get the total number of users connected from Redis.

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