Web page calling web service; Concurrency problem?

  • Thread starter Thread starter tale
  • Start date Start date
T

tale

Hello all,

I'm writing an ASP.NET web page that will call a web service. Another
developer here stated that he believed that due to the System.Net
connection limit being set to 2 that only two connections can be made
from the web page to the web service. We are expecting many
concurrent page loads.

I was wondering if this is really a problem for web pages. Does the
two connection limit apply to the whole web site or just the web page?
If it applies to the web site, then how does all of the ASP.NET web
sites that use passport get around this problem? I believe that
passport authentication uses a web service. If I'm correct in my
assumption, then these busy sites that use passport for authentication
would definitely be authenticating more than 2 people at a time. Do
the other web pages have to wait on those two connections?


Here are two links that I've found that talk about the limit. If you
can prove or disprove my assumption, please provide me some links to
documentation so I convince this other developer.

http://support.microsoft.com/default.aspx?scid=kb;en-us;183110

http://msdn.microsoft.com/library/d...uide/html/cpconbestpracticesfornetclasses.asp


Thanks in advance,
-- tale
 
Hi, tale,

What you are referring is the limit for the connections through WinInet API,
which does not apply to the IIS, but to the client applications that need to
connect to the internet.

The actual number of maximum concurrent incoming connections to a website is
controlled in the machine.config file in the <processModel> and
<httpRuntime> sections, namely maxWorkerThreads and maxIoThreads in the
processModel element and minFreeThread in the httpRuntime element. See:

http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfProcessmodelSection.asp
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfHttpRuntimeSection.asp

Basically, if you don't write crazy pages that start a bunch of threads the
maximum number of requests handled simultaneously is ((maxWorkerThreads per
CPU) - minFreeThread). With the default values in the machine.config for a
single-CPU machine this results in maximum of 12 concurrent requests handled
simultaneously.

Hope this helps
Martin
 
actually this limit applys to asp.net. the default behavior for asp.net page
making webservice calls is still two connections per server. you
canoverride this limit at runtime.

the reason for the limit is net etiquette. one client is not supposed to
overuse a remote resource. in this case your web server is the client, but
the rule is same, you should not overload a remote server unless you know
its ok, so the override should be on a server by server basis.

-- bruce (sqlwork.com)
 
actually this limit applys to asp.net. the default behavior for asp.net page
making webservice calls is still two connections per server. you
canoverride this limit at runtime.

Ok, so this does apply to asp.net.
the reason for the limit is net etiquette. one client is not supposed to
overuse a remote resource. in this case your web server is the client, but
the rule is same, you should not overload a remote server unless you know
its ok, so the override should be on a server by server basis.


So does this 2 connection limit apply to each page, the web site
(assuming you are running multiple sites on one server) or the server
itself?

If it applies to the server, then I have another question. In my
first post, I stated that I thought passport used web services. How
can this limit apply to the server and these web sites that use
passport still handle the amount of concurrent page view thst they
normally handle?

-- Tale
 
Back
Top