简体   繁体   中英

Could a websocket become blocked by pending http requests?

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM