views:

453

answers:

3

I know that RFC requires UserAgent to have a limit of max 2 http connection to single server. In fact, most browsers have the limit larger than 2.

The question is whether Silverlight have such limitation. Does it follow limit of hosting web browser? or does it has its own max connection limit?

+3  A: 

I don't now the exact answer to your question, but Silverlight 2 uses the browser HTTP stack and probably is limited to what it will do. In Silverlight 3 you have a choice between the browser stack and a new Silverlight stack. I don't know if the new stack is limited to two simultaneous connections to the same site, but it should be possible to check this by creating a small test program.

Martin Liversage
This is correct: using the default browser HTTP stack in a Silverlight app means you will get as many concurrent connections as the browser provides (in older browsers usually 2, in newer browsers usually 6-8).Using the new client HTTP stack always gives you 6.
KeithMahoney
@KeithMahoney: You should provide your comment as an answer which then would be a very good candidate for an accepted answer.
Martin Liversage
+1  A: 

SL will use the browsers http stack to make requests (in SL3 you can skip round the browser itself but you will still end up using a client side stack like WinINET which is still limited).

AnthonyWJones
A: 

According to RFC 2068:

"Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion of the Internet or other networks."

Windows certainly enforces this limit across the operating system, but you can fix that changing the registry keys located at:

My Computer\HKEY_USERS(current user sid)\Software\Microsoft\Windows\CurrentVersion\Internet Setting\

The keys to change are:

MaxConnectionsPer1_0Server MaxConnectionsPerServer

You can set them to values above their default to increase the Windows limitation. That's OS specific though and may still be limited by the browser, though as Anthony points out you can get around the browser all together using the new networking stack in SL3.

I think it's good to play nice with the RFC spec (I'm sure there was a good reason for it) and keep your number of simultaneous connections limited to 2 per server. If you need more then maybe you can look for a protocol other than HTTP that would better suit your needs.

James Cadd