Replies: 2 comments 3 replies
-
That sounds weird indeed. Does it happen regularly? Or for specific clients/browsers?
Yes, your setup looks good. Do you use the same domain for your backend and your frontend? If not, did you set the References: |
Beta Was this translation helpful? Give feedback.
-
Hi @darrachequesne - thanks for the reply
"Session ID unknown" errors happen pretty regularly; however, for most of those occurrences I'm unable to cross-reference the Here's a screenshot of our logs to illustrate note:
Interestingly, there's a similar behaviour pattern that occurs right before the group of highlighted log messages except that the Is it the client or the server that end up setting the
Yes, same domain. |
Beta Was this translation helpful? Give feedback.
-
I have an application comprised of 3 socket.io server instances all behind a single AWS Application Load Balancer, and the ALB has session stickiness enabled (using "duration-based stickiness").
The application logs a message on
connection
events emitted by the socket.ioServer
. In that log message I include the "sid" (viasocket.client.id
), as well as "server instance identifier" (the kubernetes pod name / replica) to see which server instance is handling the socket.io connection.The application also logs a message on
connection_error
events emitted by engine.io. Those log messages include thecontext
(which includes asid
for "Session ID unknown" errors), as well as the "server instance identifier".I often see a
connection
log with a givensid
coming from one replica, with a "Session ID unknown"connection_error
(with the same givensid
) coming from another replica. This suggests that (sometimes) session stickiness isn't working.Is my ALB + socket.io setup sufficient for running multiple socket.io instances?
Does the load balancer have to use "application-based stickiness" instead, and if so why?
Beta Was this translation helpful? Give feedback.
All reactions