Replies: 1 comment 2 replies
-
How do you shut down older instances of
In general, it's better to rely on heartbeats than on the callbacks. Callbacks are not reliable; there is always a chance of a server crash. I shared some presence tracking ideas (and code) here: https://noti.st/palkan/MeBUVe/the-pitfalls-of-realtime-ification (see Resources). |
Beta Was this translation helpful? Give feedback.
-
I think I have a pretty basic question but couldn't find an answer in the docs.
If I have clients subscribed while I'm doing a deployment, I get this behavior where there ends up being a 'ghost' client.
In my app I want to keep track of each instance of a user joining from multiple tabs, so the connection ID is not tied to a cookie. Instead it's a newly generated UUID for each connection.
What I observe:
My app (like a chat room) shows another instance of the logged in user if the window is open during a deployment
Hypothesis:
During the deploy, the connection gets dropped without the
unsubscribe
happening on the server side.When the user tries to reconnect, they are connected with a new connection ID and the server (which is tracking members of the room in Redis) reports back both the old and the new connection.
Question:
(Assuming my hypothesis is correct). If I miss the
unsubscribe
call, is there a way to check that my server-side participant list is actually accurate based on current connections? Or is there some other approach I'm missing?Beta Was this translation helpful? Give feedback.
All reactions