Socket connection issues

  1. When io.connect() is called, the library makes a call to the server which looks like?EIO=3&transport=polling&t=LqtOnHh,server responds with something like"90:0{"sid":"pcJM_AEZirrJT-DuAAUy","upgrades[], "pingInterval":3600000,"pingTimeout":3600000}2:40"here the server generates a socket object on server side and sends its id back to the client.
  2. After this client makes another call to the server which is something like


this is the long poll call that client makes to the server, if you see here it is passing the sessionId which it received in first call above, if the call goes to same node which generated that sessionId, the node identifies the socket connection for which the request has been made and responds.

But behind load balancer the call may go to some other node that didn’t generate this sessionId, in that case the node will not be able to identify the sessionId for which the call was made and hence responds with {"code":1,"message":"Session ID unknown"}

i am facing the exact scenario.

is this on Glitch? Glitch only gives you a single container for a project

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.