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

multi-server using store redis to sync session. when disconnected what will happen? #1448

Closed
letiennam29 opened this issue Mar 13, 2014 · 3 comments

Comments

@letiennam29
Copy link

Hi everybody, I have a question.

I have 2 server socket.io and sync session by store redis.
So i have 1 client connect then 2 server will contain same session.

But when i disconnect, Are both servers delete session?

@nicoburghi
Copy link

They should delete the session, but they do not.
Check out this links:
#831
SpiderStrategies@caa96a5
https://github.com/observing/socket.io/commit/6d458d86697ddd8b10f68905fec02ca9feb3541c

I applied the changes proposed in these links to avoid memory issues caused by socket object references.

@radicans
Copy link

As you're using the RedisStore you might also be interested in reading this: https://medium.com/p/2c8ad1153332 before considering using it in production.

@letiennam29
Copy link
Author

tks @nicoburghi , @radicans
I have do manual by:
When disconnect at a server. I using pub/sub redis for sync "socket.id" to other server. then call function "socket.disconnect()"

That's ok!

This issue was closed.
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

3 participants