Vitaliy Isikov
Vitaliy Isikov

Reputation: 3654

Multiple concurrent $.post causing blocking

I have an app where multiple concurrent ajax requests are sent out to my nodeJS backend server. The calls are sent out in rapid succession and immediately sent out again after data is received.

I don't mean all of JS is being blocked, please view the screenshot (bottom right corner) to see what I'm referring to.

enter image description here

Can someone please explain to me what this blocking is and if there is anyway around it?

Upvotes: 0

Views: 97

Answers (2)

Ely
Ely

Reputation: 3240

There is a browser connection limit, but most modern browsers are 6+ concurrent connections, it looks like it is being blocked on the server side. Is this request fairly CPU intensive? If it is, Node might be holding up the request as it is single threaded.

Upvotes: 1

Nabil Kadimi
Nabil Kadimi

Reputation: 10394

Your browser is probably limiting the number of simultaneous connections to the server.

PS.

It is, however, considered poor etiquette to make too many connections to a server and may lead to you being banned from that server. Anything above 10 is excessive.
- mozillaZine : Network.http.max-persistent-connections-per-server -

Upvotes: 0

Related Questions