SSE(EventSource): why no more than 6 connections?

The reason could be every EventSource object initiates the new HTTP session and in fact opens new tcp/ip socket. Because of you’re pushing data from server continuously in infinite loop, the socket keeps open continuously.
All web browsers has an upper limit on simultaneous active HTTP/1 connections to the same server. Normally in range of 4 to 6 as per RFC 2616. Your browser just preventing new connection to be open as this limit to be exceeded.

With HTTP/2 and HTTP/3, the limit is higher (100 connections by default).

You may learn here some more info as well:
http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/

Leave a Comment