I am a newbies programming WCF in .net. Recently, I worked on one of the WCF project which responds bytes of image file to the client. Everything worked fine but the performance. Although the service is built on with concurrency mode as parallel, it puts all the requests in queue. Thus, if 5 requests are in queue, the last request has to wait 5X (15 sec instead of 3 sec). The msdn blog: http://social.msdn.microsoft.com/Forums/en/wcf/thread/861ea6f7-6c4e-4c3f-abde-ae60228244ea explains about similar problem. But the solution was not helpful to me. I would like to thank in advance to you all for any suggestion/help.
Share
Firstly, if at all possible, I recommend using IIS7 on Server 2008+ if at all possible. Its capabilities far exceed IIS6′. If you’re unable to use IIS7 …
Be sure you’ve configured you website hosting your WCF services as a web garden. This allows multiple worker processes to process incoming requests. This overcomnig situations where the ASP.NET thread-pool saturates/blocks, resulting in requests being queued while the single worker process churns through each request in sequence.
Secondly, as the article you point to states, be sure to boost the number of concurrent threads ASP.NET is configured to handle.
Note, if your code is calling into code that serializes work to a single blocking thread (e.g. COM objects written in VB6 that perform ANY string manipulation), then it doesn’t matter how many worker threads you configure – they’ll all be serialized down to one thread (since VB6’s string routines are single-threaded)! This is why the web-garden & multiple worker processes configuration is so important.
HTH.