tags:

views:

68

answers:

1

I am developing an application which requires real-time updates to the end user. However, I am not sure of the consequences of having a persistent HTTP connection. Does the browser limit the number of connections one can have? Is it alright for the back end server to have thousands of persistent connections? What happens if I don't use something like jetty to manage all these connections?

+1  A: 

Yes, the browser limits the number of connections. For IE6, this limit is two per server, which is quite restrictive. There are workarounds, however.

Here's a good article on circumventing the HTTP connection limits: Circumventing browser connection limits for fun and profit.

There is also the question of scalability on the server, as you mention. Consider that each persistent HTTP connection would occupy a TCP port on the server. So, the number of ports per TCP address is a theoretical upper bound for the server, per IP address the server has. Since you can have multiple IP addresses for your server, the more likely limit to scalability will be the hardware itself.

Chris W. Rea