Saturday, 9 November 2019

Is there any disadvantage in enforcing a Single Web Socket Connection per User?

I came across this article. It talks about

Enforcing a Single Web Socket Connection per User

It states that some of the advantages are that it makes the server side logic less complex among others. My questions are

  1. Are there any disadvantages of doing the same?
  2. Is it a common/good practice to do so when creating real-time applications using websockets?

-----------EDIT-------------

  1. After doing some research I have learnt that you can share express sessions with socket.io. Which brings me to this question: Is there any need/advantage of Enforcing a Single Web Socket Connection per User if socket.io and express are sharing sessions? Or is it fine to allow a user to have multiple socket connections as long as they are all linked to their user._id or something that identifies them?


from Is there any disadvantage in enforcing a Single Web Socket Connection per User?

No comments:

Post a Comment