We have a page that makes a request to a 3'rd party web service. When under heavy load this response time extends significantly, however the 3'rd party reports back that there times for processing remains constant. There timings show that from the time they receive a request to the time they send it back is always around 1.5-2.0 seconds. Now we are experiencing wait times of over 20 seconds. My understanding of ASP.NET is that each request will run on a IIS thread pool thread and make the request to the 3'rd party service return and process. So I don't really understand what could be blocking on our end. Is there something I am missing?? Is there a threshold limit beyond IIS that is blocking?
If I am missing something a physical book recommendation that covers this subject would also be a very welcome addition to any answer.
.NET limits enforces a limit of 2 concurrent web requests to a single host as suggested by the HTTP specification. So in your case it's not the web service that needs more time to execute, but your application delaying the requests to stay inside this constraint.
You can raise the limit for the web service by adding this key to your config file:
<system.net>
<connectionManagement>
<!-- specific servers... -->
<add address="http://example.org" maxconnection="20" />
<!-- ...or any server -->
<add address="*" maxconnection="8" />
</connectionManagement>
</system.net>
You might want to read these for more information:
Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications Performance Considerations for Making Web Service Calls from ASPX Pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With