1

Other posts and this site make it clear that there is a limit to the number of connections a browser might have pending:

http://www.browserscope.org/?category=network

How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?

My question is, how might this effect websockets? Could 6 pending http requests block a msg from the server? If so, is there a port configuration that might avoid this?

Please forgive my ignorance of all this networking. I am very JS focused and our websocket usage is critical.

Thank you, Rc

Community
  • 1
  • 1
R Claven
  • 1,160
  • 2
  • 13
  • 27

2 Answers2

2

Nope.

A WebSocket is a persistent connection, it stays connected all the time as long you do not navigate away.

Each browser implement its own connection limit, that may delay or block temporally the WebSocket connection if there are too many ongoing connections, but once the connection is established, no messages will be block because of that.

vtortola
  • 34,709
  • 29
  • 161
  • 263
1

It could block, but there may be numerous other reasons.

Try reducing amount of requests. If you still have a problem, then the reason of blocking is elsewhere.

Once I faced a problem in php/Symfony2, when pending request was blocking any other connections due to session lock.

kirilloid
  • 14,011
  • 6
  • 38
  • 52
  • oh wow. Thank you for the response and especially the reference to your past issue. But could we clarify that one of your connections was a web socket? – R Claven May 28 '14 at 19:30
  • 1
    No, it was long polling ajax. Nonetheless, you need to test code under different conditions to find out, where is the root of the problem. And websocket connection *starts* as normal HTTP request. – kirilloid May 28 '14 at 19:35