In this article, you will learn about throttling In WCF.
I have chosen a very confusing topic again, at least for me. So, let’s get into this and try to come to some conclusion. Throttling When we have achieved an intermediate level in coding, we need to work towards betterment of it, especially when we work in Client-Server environment. Let’s say, I did ample things in the code for a performance boost but I'm still not getting the output that I am looking for. For the same, we need to be aware of a few configurations or settings in the WCF config file for getting more prompts and good results. I am assuming that readers are aware of “ABC” in WCF and have already developed a few. Without that, it won’t be easy to understand the concept of Throttling. Throttling is a mix and match of Concurrent Calls, Concurrent Instances, and Concurrent Sessions. In WCF, it’s used to limit the Calls, Instances, and Sessions to increase the throughput. You can leverage throttling to optimize and control things. Throttling can be achieved through configuration in Web.Config file, or programmatically as well. Let’s start with concurrency Concurrency: You might have heard about readers and writers problems where one thread cab can be used only for one purpose. Let's say, I have a file and I want to read from it. One more thread is there and it wants to update the file. This is called a concurrency issue. WCF service can handle one request at a time. So, maxconcurrentcall will help WCF to handle multiple requests at a single point of time.
Configuration in Web.Config file To increase the throughput of the service, multiple concurrent calls must be allowed to process. So, we have to set the limits of total number of calls that can currently be in progress across all the service instances. For the same, we can use maxconcurrentcall feature in Web.Config file.
Essential WCF Practical Implementation